From dbf7388c5bff162209924c6bb7ca051251e61bd9 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 5 Nov 2010 15:29:50 +0000 Subject: [PATCH] Don't anchor regex. Props ozh. fixes #14628 git-svn-id: http://svn.automattic.com/wordpress/trunk@16207 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 180747c7c3..6b470f3fb0 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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 ) {