[textpattern] r5892 committed - Palm off email validation to PHP. Fixes issue 418. Sort of.

0 views
Skip to first unread message

textp...@googlecode.com

unread,
Sep 11, 2014, 7:15:04 PM9/11/14
to txp...@googlegroups.com
Revision: 5892
Author: stefdawson
Date: Thu Sep 11 23:14:54 2014 UTC
Log: Palm off email validation to PHP. Fixes issue 418. Sort of.
https://code.google.com/p/textpattern/source/detail?r=5892

Modified:
/development/4.5/textpattern/lib/txplib_misc.php

=======================================
--- /development/4.5/textpattern/lib/txplib_misc.php Thu Dec 5 09:45:18
2013 UTC
+++ /development/4.5/textpattern/lib/txplib_misc.php Thu Sep 11 23:14:54
2014 UTC
@@ -1316,7 +1316,7 @@

function is_valid_email($address)
{
- return
preg_match('/^[a-z0-9](\.?[a-z0-9_+%-])*@([a-z0-9](-*[a-z0-9])*\.)+[a-z]{2,6}$/i',
$address);
+ return (bool) filter_var($address, FILTER_VALIDATE_EMAIL);
}

// -------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages