Subscribers import: Step1 also uses the email regexp to validate emails [MAILPOET-1288]
This commit is contained in:
@@ -164,8 +164,9 @@ define(
|
||||
// is the email in 'mailto:email' format?
|
||||
email = test[1].trim();
|
||||
}
|
||||
// test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902)
|
||||
if (!/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-@]+$/.test(email)) {
|
||||
|
||||
// validate email
|
||||
if (!window.mailpoet_email_regex.test(email)) {
|
||||
return false;
|
||||
}
|
||||
return email;
|
||||
|
Reference in New Issue
Block a user