Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c2f1fd

Browse files
Issues #23147, #23148: Presumably fixed bugs in folding UnstructuredTokenList.
1 parent b3b65e6 commit 6c2f1fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/email/_header_value_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def _fold(self, folded):
439439
if folded.append_if_fits(part):
440440
continue
441441
if part.has_fws:
442-
part.fold(folded)
442+
part._fold(folded)
443443
continue
444444
# It can't be split...we just have to put it on its own line.
445445
folded.append(tstr)
@@ -460,7 +460,7 @@ def cte_encode(self, charset, policy):
460460
last_ew = len(res)
461461
else:
462462
tl = get_unstructured(''.join(res[last_ew:] + [spart]))
463-
res.append(tl.as_encoded_word())
463+
res.append(tl.as_encoded_word(charset))
464464
return ''.join(res)
465465

466466

0 commit comments

Comments
 (0)