[Plugin: WP-Invites widget] Regex will modify email address
-
There is a bug with the current regex in preg_match_all
An email address of kindmickey.mouse@gmail.com will be cut to mouse@gmail.comI solved by changing:
preg_match_all ('/([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/i', $_POST ['email'], $emails);into:
$pattern='/([\s]*)([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*([ ]+|)@([ ]+|)([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,}))([\s]*)/i'; preg_match_all ($pattern , $_POST ['email'], $emails);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: WP-Invites widget] Regex will modify email address’ is closed to new replies.