summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-01-06 15:30:11 -0500
committerhmhealey <harrisonmhealey@gmail.com>2016-01-06 15:30:11 -0500
commitee0366a862815e70c344b17e8f0063c178bf86bb (patch)
tree6a03d1cb22ccaebfb6de2dff82299a9371da2adb /web
parent0eb145218edb37d911cc5ec135b0006f866a44b2 (diff)
downloadchat-ee0366a862815e70c344b17e8f0063c178bf86bb.tar.gz
chat-ee0366a862815e70c344b17e8f0063c178bf86bb.tar.bz2
chat-ee0366a862815e70c344b17e8f0063c178bf86bb.zip
Removed email regex
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/utils.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index a808c9be3..bdc9083ec 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -15,9 +15,9 @@ import * as client from './client.jsx';
import Autolinker from 'autolinker';
export function isEmail(email) {
- //var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
- var regex = /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i;
- return regex.test(email);
+ // writing a regex to match all valid email addresses is really, really hard (see http://stackoverflow.com/a/201378)
+ // so we just do a simple check and rely on a verification email to tell if it's a real address
+ return email.indexOf('@') !== -1;
}
export function cleanUpUrlable(input) {