diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-17 10:25:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-17 10:25:15 (GMT) |
commit | 6c2f1fd71075ced14e7ba40e232297ba878aadd1 (patch) | |
tree | 086290fdacef77f232878a4bc73d3c64fc74137f /Lib/email/_header_value_parser.py | |
parent | b3b65e618c31e37458d5da46c8216f7c0404f547 (diff) | |
download | cpython-6c2f1fd71075ced14e7ba40e232297ba878aadd1.zip cpython-6c2f1fd71075ced14e7ba40e232297ba878aadd1.tar.gz cpython-6c2f1fd71075ced14e7ba40e232297ba878aadd1.tar.bz2 |
Issues #23147, #23148: Presumably fixed bugs in folding UnstructuredTokenList.
Diffstat (limited to 'Lib/email/_header_value_parser.py')
-rw-r--r-- | Lib/email/_header_value_parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index 2226e13..5df9511 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -439,7 +439,7 @@ class UnstructuredTokenList(TokenList): if folded.append_if_fits(part): continue if part.has_fws: - part.fold(folded) + part._fold(folded) continue # It can't be split...we just have to put it on its own line. folded.append(tstr) @@ -460,7 +460,7 @@ class UnstructuredTokenList(TokenList): last_ew = len(res) else: tl = get_unstructured(''.join(res[last_ew:] + [spart])) - res.append(tl.as_encoded_word()) + res.append(tl.as_encoded_word(charset)) return ''.join(res) |