cpython
cpython copied to clipboard
gh-120930: Do not add additional space within encoded word when folding EmailMessage
After some changes applied in ffe9ba04778f852a14f2404b5fcf13cb3ba1bf45 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.
- Issue: gh-120930
LGTM, though I did suggest an alternative phrasing for the news item.
Thanks @matthieucan for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. 🐍🍒⛏🤖
GH-121963 is a backport of this pull request to the 3.13 branch.
GH-121964 is a backport of this pull request to the 3.12 branch.