mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-20 14:36:53 +00:00
(js) Improve regular expression for email address
This commit is contained in:
1 parent
98064259a2
commit
6272cb5a85
1 file changed
+1
-1
@@ -117,7 +117,7 @@ function extractEmailAddress(mailTo) {
|
||||
var email = "";
|
||||
|
||||
var emailre
|
||||
= /([a-zA-Z0-9\._\-]*[a-zA-Z0-9_\-]+@[a-zA-Z0-9\._\-]*[a-zA-Z0-9])/;
|
||||
= /([a-zA-Z0-9\._\-]*[a-zA-Z0-9_\-%\+]+@[a-zA-Z0-9\._\-]*[a-zA-Z0-9])/;
|
||||
if (emailre.test(mailTo)) {
|
||||
emailre.exec(mailTo);
|
||||
email = RegExp.$1;
|
||||
|
||||
Reference in new issue
Block a user