Allow apostrophes in email addresses when adding users via the Dashboard.

Email addresses entered in a number of interfaces were not being stripslashed
properly, with the result that the emails were not being recognized as valid.

Fixes #18039.
Built from https://develop.svn.wordpress.org/trunk@29966


git-svn-id: http://core.svn.wordpress.org/trunk@29713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges
2014-10-19 20:30:19 +00:00
parent 304802d70d
commit 24babfddb3
3 changed files with 11 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ function edit_user( $user_id = 0 ) {
}
if ( isset( $_POST['email'] ))
$user->user_email = sanitize_text_field( $_POST['email'] );
$user->user_email = sanitize_text_field( wp_unslash( $_POST['email'] ) );
if ( isset( $_POST['url'] ) ) {
if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) {
$user->user_url = '';