mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-12 02:11:23 +00:00
Improve JS regexp for email addresses
This commit is contained in:
@@ -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