Don't anchor regex. Props ozh. fixes #14628

git-svn-id: https://develop.svn.wordpress.org/trunk@16207 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-11-05 15:29:50 +00:00
parent d73a826715
commit b7ed18e2ec

View File

@ -1768,7 +1768,7 @@ function sanitize_email( $email ) {
$sub = trim( $sub, " \t\n\r\0\x0B-" );
// Test for invalid characters
$sub = preg_replace( '/^[^a-z0-9-]+$/i', '', $sub );
$sub = preg_replace( '/[^a-z0-9-]+/i', '', $sub );
// If there's anything left, add it to the valid subs
if ( '' !== $sub ) {