diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-04 07:33:57 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-04 07:33:57 +0000 |
| commit | fec2161d0fe891daef885de3948652047f9ff5db (patch) | |
| tree | 053df19b9ad62d83d53e0936f0af7346b685c471 /roundcubemail/program/js/common.js | |
| parent | 9e154adf7454ee719abc7ca3b5201b8716c4544f (diff) | |
Fix client side e-mail address check
git-svn-id: https://svn.roundcube.net/trunk@1011 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/common.js')
| -rw-r--r-- | roundcubemail/program/js/common.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js index 40d97cb8f..6435f3b77 100644 --- a/roundcubemail/program/js/common.js +++ b/roundcubemail/program/js/common.js @@ -399,7 +399,8 @@ function rcube_check_email(input, inline) var domain = sub_domain+'(\\x2e'+sub_domain+')*'; var local_part = word+'(\\x2e'+word+')*'; var addr_spec = local_part+'\\x40'+domain; - var reg1 = inline ? new RegExp('(^|<)'+addr_spec+'(>|$)', 'i') : new RegExp('^'+addr_spec+'$', 'i'); + var delim = '[,;\s\n]'; + var reg1 = inline ? new RegExp('(^|<|'+delim+')'+addr_spec+'($|>|'+delim+')', 'i') : new RegExp('^'+addr_spec+'$', 'i'); return reg1.test(input) ? true : false; } return false; |
