Commit 411b51c9 authored by Dries's avatar Dries

- Patch #7725 by Marius: fixed glitch in e-mail address validation code. A...

- Patch #7725 by Marius: fixed glitch in e-mail address validation code.  A subset of e-mail addresses was rejected as valid.
parent fa5fa7da
......@@ -551,7 +551,7 @@ function drupal_specialchars($input, $quotes = ENT_NOQUOTES) {
*/
function valid_email_address($mail) {
$user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
$domain = '(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\.?)+';
$domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+';
$ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
$ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment