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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-11-05 15:29:50 +00:00
parent fccb87dbcb
commit dbf7388c5b
1 changed files with 1 additions and 1 deletions

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 ) {