Fix regex function in sanitize_email(), see #9316
git-svn-id: https://develop.svn.wordpress.org/trunk@10777 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cfef7198b4
commit
297703490b
@ -1516,8 +1516,7 @@ function sanitize_email( $email ) {
|
||||
|
||||
// LOCAL PART
|
||||
// Test for invalid characters
|
||||
$local = preg_replace( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', '', $local );
|
||||
if ( '' === $local ) {
|
||||
if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
|
||||
return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user