diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2024-02-17 10:13:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 10:13:46 (GMT) |
commit | 09fab93c3d857496c0bd162797fab816c311ee48 (patch) | |
tree | 3285ab2965952b5685bb70c72525fcef44807a05 /Lib/test/test_email | |
parent | 465db27cb983084e718a1fd9519b2726c96935cb (diff) | |
download | cpython-09fab93c3d857496c0bd162797fab816c311ee48.zip cpython-09fab93c3d857496c0bd162797fab816c311ee48.tar.gz cpython-09fab93c3d857496c0bd162797fab816c311ee48.tar.bz2 |
gh-100884: email/_header_value_parser: don't encode list separators (GH-100885)
ListSeparator should not be encoded. This could happen when a long line
pushes its separator to the next line, which would have been encoded.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r-- | Lib/test/test_email/test__header_value_parser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py index bdb0e55..f7e8074 100644 --- a/Lib/test/test_email/test__header_value_parser.py +++ b/Lib/test/test_email/test__header_value_parser.py @@ -2985,6 +2985,11 @@ class TestFolding(TestEmailBase): '=?utf-8?q?H=C3=BCbsch?= Kaktus <beautiful@example.com>,\n' ' =?utf-8?q?bei=C3=9Ft_bei=C3=9Ft?= <biter@example.com>\n') + def test_address_list_with_list_separator_after_fold(self): + to = '0123456789' * 8 + '@foo, ä <foo@bar>' + self._test(parser.get_address_list(to)[0], + '0123456789' * 8 + '@foo,\n =?utf-8?q?=C3=A4?= <foo@bar>\n') + # XXX Need tests with comments on various sides of a unicode token, # and with unicode tokens in the comments. Spaces inside the quotes # currently don't do the right thing. |