File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -949,6 +949,7 @@ class _InvalidEwError(errors.HeaderParseError):
949949# up other parse trees. Maybe should have tests for that, too.
950950DOT = ValueTerminal ('.' , 'dot' )
951951ListSeparator = ValueTerminal (',' , 'list-separator' )
952+ ListSeparator .as_ew_allowed = False
952953RouteComponentMarker = ValueTerminal ('@' , 'route-component-marker' )
953954
954955#
@@ -2022,7 +2023,7 @@ def get_address_list(value):
20222023 address_list .defects .append (errors .InvalidHeaderDefect (
20232024 "invalid address in address-list" ))
20242025 if value : # Must be a , at this point.
2025- address_list .append (ValueTerminal ( ',' , 'list-separator' ) )
2026+ address_list .append (ListSeparator )
20262027 value = value [1 :]
20272028 return address_list , value
20282029
Original file line number Diff line number Diff line change @@ -2985,6 +2985,11 @@ def test_address_list_with_unicode_names_in_quotes(self):
29852985 '=?utf-8?q?H=C3=BCbsch?= Kaktus <beautiful@example.com>,\n '
29862986 ' =?utf-8?q?bei=C3=9Ft_bei=C3=9Ft?= <biter@example.com>\n ' )
29872987
2988+ def test_address_list_with_list_separator_after_fold (self ):
2989+ to = '0123456789' * 8 + '@foo, ä <foo@bar>'
2990+ self ._test (parser .get_address_list (to )[0 ],
2991+ '0123456789' * 8 + '@foo,\n =?utf-8?q?=C3=A4?= <foo@bar>\n ' )
2992+
29882993 # XXX Need tests with comments on various sides of a unicode token,
29892994 # and with unicode tokens in the comments. Spaces inside the quotes
29902995 # currently don't do the right thing.
Original file line number Diff line number Diff line change 1+ email: fix misfolding of comma in address-lists over multiple lines in
2+ combination with unicode encoding.
You can’t perform that action at this time.
0 commit comments