• There is a bug with the current regex in preg_match_all
    An email address of kind

    mickey.mouse@gmail.com will be cut to mouse@gmail.com

    I 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);

    http://wordpress.org/extend/plugins/wp-invites-widget/

Viewing 1 replies (of 1 total)
  • Philipp

    (@philippmuenchen)

    Thank you soooo much! I went crazy cause the invitation codes very often didn’t reach the people!

    Thanks a lot!

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-Invites widget] Regex will modify email address’ is closed to new replies.