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

gh-120930: Remove extra blank occuring in wrapped encoded words in email headers #121747

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

matthieucan
Copy link
Contributor

@matthieucan matthieucan commented Jul 14, 2024

After some changes applied in ffe9ba0 to fix whitespace between encoded words when folding an EmailMessage, the following issue was introduced:

  • When an encoded word is split in two parts in the folding process (to fit the first part on the end of one line, and the second part on the beginning of the next line), an encoded whitespace character is added at the beginning of the second line.

This patch fixes the special case.

@matthieucan matthieucan requested a review from a team as a code owner July 14, 2024 09:29
Copy link

cpython-cla-bot bot commented Jul 14, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thank you for the fix! Looks good (assuming tests pass).

Let's give @python/email-team a chance to review as well.

@bitdancer
Copy link
Member

LGTM, though I did suggest an alternative phrasing for the news item.

@matthieucan matthieucan changed the title gh-120930: Do not add additional space within encoded word when folding EmailMessage gh-120930: Remove extra blank in encoded words occurring in wrapped email headers Jul 15, 2024
@matthieucan matthieucan changed the title gh-120930: Remove extra blank in encoded words occurring in wrapped email headers gh-120930: Remove extra blank occuring in wrapped encoded words in email headers Jul 15, 2024
@encukou encukou merged commit cecacee into python:main Jul 18, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @matthieucan for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 18, 2024
… in email headers (pythonGH-121747)

(cherry picked from commit cecacee)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 18, 2024
… in email headers (pythonGH-121747)

(cherry picked from commit cecacee)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 18, 2024

GH-121963 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 18, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jul 18, 2024

GH-121964 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jul 18, 2024
encukou pushed a commit that referenced this pull request Jul 19, 2024
…s in email headers (GH-121747) (GH-121963)

gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)
(cherry picked from commit cecacee)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
encukou pushed a commit that referenced this pull request Jul 19, 2024
…s in email headers (GH-121747) (GH-121964)

gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)
(cherry picked from commit cecacee)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
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.

4 participants