summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-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;