-
Notifications
You must be signed in to change notification settings - Fork 714
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
Quote names containing comma or semicolon #618
Conversation
Codecov Report
@@ Coverage Diff @@
## v4 #618 +/- ##
==========================================
+ Coverage 84.34% 84.38% +0.03%
==========================================
Files 37 37
Lines 952 967 +15
Branches 105 108 +3
==========================================
+ Hits 803 816 +13
- Misses 92 93 +1
- Partials 57 58 +1
Continue to review full report at Codecov.
|
Could you please merge this agains this branch? Thanks! With Best Regards, Elmer |
b580df6
to
0434738
Compare
There... finished the fight with the CI. This PR is ready to merge into v4. |
Hello @cmccandless, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I realize this was merged a while back, but there are a couple of likely problems in it.)
# Escape common CSV delimiters as workaround for | ||
# https://github.com/sendgrid/sendgrid-python/issues/578 | ||
if value is not None and (',' in value or ';' in value): | ||
value = html_entity_decode(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you actually want email.utils.quote
here. (Email display names don't really have anything to do with HTML entities.)
|
||
# Escape common CSV delimiters as workaround for | ||
# https://github.com/sendgrid/sendgrid-python/issues/578 | ||
if value is not None and (',' in value or ';' in value): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also or '"' in value
. ("
in the name will cause the same problems as comma.)
Fixes #578
Checklist
Short description of what this PR does: