]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-117313: Fix re-folding email messages containing non-standard line separato...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 17 Apr 2024 10:48:56 +0000 (12:48 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Apr 2024 10:48:56 +0000 (10:48 +0000)
commitc34c962d07fb5f6934a55d1dc45a112b751ae401
tree6b03e70b94d6652ed67104000ab956fc6f8b97b2
parent96b29b32c181716d1b6b62976e241b8c74b77430
[3.12] gh-117313: Fix re-folding email messages containing non-standard line separators (GH-117369) (GH-117971)

Only treat '\n', '\r' and '\r\n' as line separators in re-folding the email
messages.  Preserve control characters '\v', '\f', '\x1c', '\x1d' and '\x1e'
and Unicode line separators '\x85', '\u2028' and '\u2029' as is.
(cherry picked from commit aec1dac4efe36a7db51f08385ddcce978814dbe3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/email/policy.py
Lib/test/test_email/test_generator.py
Misc/NEWS.d/next/Library/2024-03-29-15-14-51.gh-issue-117313.ks_ONu.rst [new file with mode: 0644]