Easy-digital-downloads: sanitize_text_field removes the + sign from the email address

Created on 16 Feb 2017  路  8Comments  路  Source: easydigitaldownloads/easy-digital-downloads

In the latest update of the plugin, On this line sanitize_text_field function removes the + sign from the email address. Which causes error in email sending. For example [email protected] email address becomes abc.def [email protected] which is invalid email format.

type-bug

Most helpful comment

This is happening b/c the + character is actually a when sent via GET requests...so therefore it's coming into the actions as a space, instead of a +.

All 8 comments

Thanks for the headsup! We'll get that fixed.

This isn't working right, it's actually stripping the + completely.

The first one was sent via checkout, the other, via the resend:
screen shot 2017-02-20 at 10 15 34 am

Running var_dump of the email address confirms:

$email = ! empty( $_GET['email'] ) ? sanitize_email( $_GET['email'] ) : '';
var_dump($email); exit;

/Users/cklosowski/Development/edd.dev/wp-content/plugins/easy-digital-downloads/includes/emails/actions.php:53:string '[email protected]' (length=37)

Looks like we're sanitizing too early on.

Going ot fix it up and commit.

This is happening b/c the + character is actually a when sent via GET requests...so therefore it's coming into the actions as a space, instead of a +.

Ready for testing.

Works well for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julien731 picture julien731  路  5Comments

nabeghe picture nabeghe  路  5Comments

michaelbeil picture michaelbeil  路  5Comments

JeroenSormani picture JeroenSormani  路  5Comments

scottbuscemi picture scottbuscemi  路  5Comments