gh-117313: Fix re-folding email messages containing non-standard line separators (GH-117369)

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.
This commit is contained in:
Serhiy Storchaka 2024-04-17 13:00:25 +03:00 committed by GitHub
parent 4e502a4997
commit aec1dac4ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 2 deletions

View file

@ -0,0 +1,4 @@
Only treat ``'\n'``, ``'\r'`` and ``'\r\n'`` as line separators in
re-folding the :mod:`email` messages. Preserve control characters ``'\v'``,
``'\f'``, ``'\x1c'``, ``'\x1d'`` and ``'\x1e'`` and Unicode line separators
``'\x85'``, ``'\u2028'`` and ``'\u2029'`` as is.