Ticket #14628: validate_email.diff

File validate_email.diff, 458 bytes (added by ozh, 3 years ago)
Line 
1Index: formatting.php
2===================================================================
3--- formatting.php      (revision 15501)
4+++ formatting.php      (working copy)
5@@ -1743,7 +1743,7 @@
6                $sub = trim( $sub, " \t\n\r\0\x0B-" );
7 
8                // Test for invalid characters
9-               $sub = preg_replace( '/^[^a-z0-9-]+$/i', '', $sub );
10+               $sub = preg_replace( '/[^a-z0-9-]+/i', '', $sub );
11 
12                // If there's anything left, add it to the valid subs
13                if ( '' !== $sub ) {