diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-02 09:27:03 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-02 09:27:03 +0000 |
| commit | 847060fb5a85af8581910c694965c136c677a621 (patch) | |
| tree | a07da67665c26842029e1f9b59b7fbadc963fdf6 /roundcubemail/program/js | |
| parent | a9b4a030d159738f59e1d782dbf0d17b1a90115f (diff) | |
- Support contact's email addresses up to 255 characters long (#1487095)
- Added email format checks when saving contacts data
git-svn-id: https://svn.roundcube.net/trunk@4166 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/common.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js index 3a8739ba2..76ddd7269 100644 --- a/roundcubemail/program/js/common.js +++ b/roundcubemail/program/js/common.js @@ -491,12 +491,11 @@ function rcube_check_email(input, inline) quoted_string = '\\x22('+qtext+'|'+quoted_pair+')*\\x22', // Use simplified domain matching, because we need to allow Unicode characters here // So, e-mail address should be validated also on server side after idn_to_ascii() use - sub_domain = '[^@]+', //domain_literal = '\\x5b('+dtext+'|'+quoted_pair+')*\\x5d', //sub_domain = '('+atom+'|'+domain_literal+')', + domain = '([^@\\x2e]+\\x2e)+[a-z]{2,}', word = '('+atom+'|'+quoted_string+')', delim = '[,;\s\n]', - domain = sub_domain+'(\\x2e'+sub_domain+')*', local_part = word+'(\\x2e'+word+')*', addr_spec = local_part+'\\x40'+domain, reg1 = inline ? new RegExp('(^|<|'+delim+')'+addr_spec+'($|>|'+delim+')', 'i') : new RegExp('^'+addr_spec+'$', 'i'); |
