summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-04-26 11:36:42 +0000
committeralecpl <alec@alec.pl>2011-04-26 11:36:42 +0000
commit5c1dfb0b115f7873ad0c33c0f514d95653f58263 (patch)
treee6f5426d5d7a65533362a8d214a99a3c094f6808 /program/js
parent3d98b4d9148c2cb307199e68644101d6229def85 (diff)
- Fix handling of top-level domains with more than 5 chars or unicode chars (#1487883)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/common.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 4d3cbfac1..00c4b001b 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -493,8 +493,8 @@ function rcube_check_email(input, inline)
// So, e-mail address should be validated also on server side after idn_to_ascii() use
//domain_literal = '\\x5b('+dtext+'|'+quoted_pair+')*\\x5d',
//sub_domain = '('+atom+'|'+domain_literal+')',
- // allow punycode in last domain part for ICANN test domains
- domain = '([^@\\x2e]+\\x2e)+([a-z]{2,}|xn--[a-z0-9]{2,})',
+ // allow punycode/unicode top-level domain
+ domain = '([^@\\x2e]+\\x2e)+([^\\x00-\\x40\\x5b-\\x60\\x7b-\\x7f]{2,}|xn--[a-z0-9]{2,})',
// ICANN e-mail test (http://idn.icann.org/E-mail_test)
icann_domains = [
'\\u0645\\u062b\\u0627\\u0644\\x2e\\u0625\\u062e\\u062a\\u0628\\u0627\\u0631',