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:
parent
fccb87dbcb
commit
dbf7388c5b
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue