Skip to content

Adds escaping of some uncommon but valid email characters#3

Merged
a6software merged 1 commit intodevelopfrom
escape-uncommon-email-characters
Feb 8, 2019
Merged

Adds escaping of some uncommon but valid email characters#3
a6software merged 1 commit intodevelopfrom
escape-uncommon-email-characters

Conversation

@a6software
Copy link

@a6software a6software commented Feb 7, 2019

Adds escaping of some uncommon but valid email characters

Copy of upstream PR - trewknowledge#236

if ( parent::remove_from_requests( $index ) ) {
$token = GDPR::generate_pin();
GDPR_Email::send( $user->user_email, 'delete-resolved', array( 'token' => $token ) );
GDPR_Email::send( $this->get_escaped_user_email_address( $user ), 'delete-resolved', array( 'token' => $token ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GDPR_Email::send( $this->get_escaped_user_email_address( $user ), 'delete-resolved', array( 'token' => $token ) );
$email_address = $this->get_escaped_user_email_address( $user )
GDPR_Email::send( $email_address , 'delete-resolved', array( 'token' => $token ) );

Copy link

@jmorgan74 jmorgan74 Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just prefer to avoid "train coach" code, feels more readable. Not really an issue though, just readability.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, it's a good shout. TBH Jon I'm just trying to do the bare minimum with it to get it to a place where we can replace the existing GDPR plugin with this fork. I don't want to change anything too much, at this stage, just so if anything goes wrong there's less to rule out.

I will get onto tidying this entire thing up as part of a further PR I have in progress currently.

@a6software a6software merged commit 24568b5 into develop Feb 8, 2019
@a6software a6software deleted the escape-uncommon-email-characters branch February 8, 2019 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants