- Fix dot-atom expression in e-mail validation regexp (#1486808)

release-0.6
alecpl 15 years ago
parent a2e81736a9
commit d7a5dfa26a

@ -1586,7 +1586,7 @@ function check_email($email, $dns_check=true)
// from PEAR::Validate // from PEAR::Validate
$regexp = '&^(?: $regexp = '&^(?:
("\s*(?:[^"\f\n\r\t\v\b\s]+\s*)+")| #1 quoted name ("\s*(?:[^"\f\n\r\t\v\b\s]+\s*)+")| #1 quoted name
([-\w!\#\$%\&\'*+~/^`|{}]+(?:\.[-\w!\#\$%\&\'*+~/^`|{}]+)*)) #2 OR dot-atom ([-\w!\#\$%\&\'*+~/^`|{}=]+(?:\.[-\w!\#\$%\&\'*+~/^`|{}=]+)*)) #2 OR dot-atom (RFC5322)
$&xi'; $&xi';
if (!preg_match($regexp, $local_part)) if (!preg_match($regexp, $local_part))

Loading…
Cancel
Save