Fix regex in sanitize_email(), props sambauers, see #9316
git-svn-id: http://svn.automattic.com/wordpress/trunk@10783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5a1c07d42f
commit
9b591073a1
|
@ -1516,7 +1516,8 @@ function sanitize_email( $email ) {
|
|||
|
||||
// LOCAL PART
|
||||
// Test for invalid characters
|
||||
if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
|
||||
$local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local );
|
||||
if ( '' === $local ) {
|
||||
return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue