mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-10 14:27:12 +00:00
Improve JS regexp for email addresses
This commit is contained in:
1 parent
d737b2fd9a
commit
5b4dd4ecb1
1 file changed
+1
-1
@@ -118,7 +118,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