summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-05-04 18:53:11 +0000
committeralecpl <alec@alec.pl>2011-05-04 18:53:11 +0000
commitba9c7b40f0dfcadf1d5711246e7b332ff7a60787 (patch)
tree10d8bc0a125fe8bc29d33592a480e245c5627e21 /program/js
parent4a7ed027e4d9b605060cecc9bd97bc3dd2c1889b (diff)
- Apply fixes from trunk (up to r4728)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js5
-rw-r--r--program/js/common.js4
2 files changed, 5 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 8cdddccca..07947db76 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -4872,8 +4872,9 @@ function rcube_webmail()
quota_width = parseInt(quota / 100 * width),
pos = $(obj).position();
- // Opera bug?
+ // workarounds for Opera and Webkit bugs
pos.top = Math.max(0, pos.top);
+ pos.left = Math.max(0, pos.left);
this.env.indicator_width = width;
this.env.indicator_height = height;
@@ -5163,7 +5164,7 @@ function rcube_webmail()
this.set_busy(false, null, lock);
request.abort();
- if (errmsg)
+ if (request.status && errmsg)
this.display_message(this.get_label('servererror') + ' (' + errmsg + ')', 'error');
};
diff --git a/program/js/common.js b/program/js/common.js
index 5c9102771..bb169a8c7 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',