diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index b5c4982141..df0ce6ee22 100644
a
|
b
|
function is_email( $email, $deprecated = false ) { |
3286 | 3286 | |
3287 | 3287 | // LOCAL PART |
3288 | 3288 | // Test for invalid characters |
3289 | | if ( ! preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) { |
| 3289 | if ( ! preg_match( '/^(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22)))*$/', $local ) ) { |
3290 | 3290 | /** This filter is documented in wp-includes/formatting.php */ |
3291 | 3291 | return apply_filters( 'is_email', false, $email, 'local_invalid_chars' ); |
3292 | 3292 | } |