summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-02-04 07:33:57 +0000
committerthomascube <thomas@roundcube.net>2008-02-04 07:33:57 +0000
commite581e741537ce97b23e5439d23d4f3179872ed9b (patch)
treeec476c6e026c49e4597c00ddecc26a74d4eda349 /program/js/common.js
parent731e0e57f42f773c76e45e28d9377407277425bf (diff)
Fix client side e-mail address check
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 40d97cb8f..6435f3b77 100644
--- a/program/js/common.js
+++ b/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;