From b7ed18e2ec07197c2f4a6ad1d2eca9c6281437e7 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 5 Nov 2010 15:29:50 +0000 Subject: [PATCH] Don't anchor regex. Props ozh. fixes #14628 git-svn-id: https://develop.svn.wordpress.org/trunk@16207 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ) {