penguin/AstroJS

Javascript framework for my blog

commit 61049939fb4fd5c676592f3ec9839fe6d3d24c6d

author斟酌 鵬兄 <tgckpg@gmail.com>
date2016-12-12T10:13:49Z
subjectFixed email address matching regex
commit 61049939fb4fd5c676592f3ec9839fe6d3d24c6d
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2016-12-12T10:13:49Z

    Fixed email address matching regex
---
 botanjs/src/Astro/Blog/Components/Comment.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/botanjs/src/Astro/Blog/Components/Comment.js b/botanjs/src/Astro/Blog/Components/Comment.js
index 5d1ccbc..953e56e 100644
--- a/botanjs/src/Astro/Blog/Components/Comment.js
+++ b/botanjs/src/Astro/Blog/Components/Comment.js
@@ -51,7 +51,7 @@
 
 	var validateMail = function ( str )
 	{
-		return v_match( str, /^[\_]*([a-z0-9]+(\.|\_*)?)+@([a-z][a-z0-9\-]+(\.|\-*\.))+[a-z]{2,6}$/ );
+		return v_match( str, /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i );
 	};
 
 	var validateURL = function ( str )