mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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:
parent
d73a826715
commit
b7ed18e2ec
@ -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
Block a user