WordPress.org

Make WordPress Core

Ticket #14628: validate_email.diff

File validate_email.diff, 458 bytes (added by ozh, 4 years ago)
  • formatting.php

     
    17431743                $sub = trim( $sub, " \t\n\r\0\x0B-" ); 
    17441744 
    17451745                // Test for invalid characters 
    1746                 $sub = preg_replace( '/^[^a-z0-9-]+$/i', '', $sub ); 
     1746                $sub = preg_replace( '/[^a-z0-9-]+/i', '', $sub ); 
    17471747 
    17481748                // If there's anything left, add it to the valid subs 
    17491749                if ( '' !== $sub ) {