Skip to content

Commit

Permalink
Avoid false positives (e.g. hotmail.com)
Browse files Browse the repository at this point in the history
ok@hotmail.com is not a spam email, but is matched by /tmail.com/
  • Loading branch information
sxyuan committed Jan 13, 2014
1 parent 616128c commit 5d86825
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platform/javascript/mailchecker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion platform/javascript/mailchecker.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(function(global){
var isValidEmail = {{& regexp }};
var isThrowableEmail = new RegExp({{& listJSON }}.join('|'));
var isThrowableEmail = new RegExp({{& listJSON }}.map(function(m) { return '\\b' + m + '$'; }).join('|'));

global.MailChecker = function(email){
if(!isValidEmail.test(email)){return false;}
Expand Down

0 comments on commit 5d86825

Please sign in to comment.