WordPress.org

Make WordPress Core

Ticket #9316: Regexp-Fix.diff

File Regexp-Fix.diff, 536 bytes (added by sambauers, 6 years ago)
  • wp-includes/formatting.php

     
    15161516 
    15171517        // LOCAL PART 
    15181518        // Test for invalid characters 
    1519         if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) { 
     1519        $local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local ); 
     1520        if ( '' === $local ) { 
    15201521                return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' ); 
    15211522        } 
    15221523