From 5c1dfb0b115f7873ad0c33c0f514d95653f58263 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 26 Apr 2011 11:36:42 +0000 Subject: - Fix handling of top-level domains with more than 5 chars or unicode chars (#1487883) --- program/js/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/js/common.js') 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', -- cgit v1.2.3