Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing invalid chars #280

Closed

Conversation

newearthmartin
Copy link
Contributor

In some cases, the subscription.name will contain special characters that cause the outgoing email to fail such as @ and ,.

Such real world example: when name is 'martin@' and email is martin@email.com, it creates this address for sending 'martin@ <martin@email.com>', which fails.

I added a filter for these characters: @, , and ; in the get_address(name, email) method.
There could be more, these are the real life cases that I faced.

I also considered changing it in the 'cleaning' part of subscription.save so that these faulty names don't even go into the database, but I decided to let them in the database and just filter them out when sending. Feel free to put your opinions about this in this PR.

@newearthmartin
Copy link
Contributor Author

Ups, not sure why there are 12 commits here, it should be only the last 2.

@newearthmartin
Copy link
Contributor Author

ah! there are so many commits because @dokterbob manually merged my last PR, so it diverged. let me see if I can fix this

@newearthmartin
Copy link
Contributor Author

Created this PR again here #281
Closing this one

@newearthmartin newearthmartin deleted the removing_invalid_chars branch September 18, 2019 04:02
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.

1 participant