WordPress.org

Make WordPress Core

Ticket #17491: 17491.diff

File 17491.diff, 538 bytes (added by sivel, 7 years ago)
  • wp-includes/formatting.php

     
    15121512
    15131513        // LOCAL PART
    15141514        // Test for invalid characters
    1515         if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
     1515        if ( ! preg_match( '/^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*$/i', $local ) ) {
    15161516                return apply_filters( 'is_email', false, $email, 'local_invalid_chars' );
    15171517        }
    15181518