diff options
author | websurfer5 <49998481+websurfer5@users.noreply.github.com> | 2019-06-06 12:53:27 -0700 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2019-06-06 12:53:27 -0700 |
commit | f6713e84afc5addcfa8477dbdf2c027787f711c0 (patch) | |
tree | 0102e1ffc13da4bf9c0b0acb39c6729cfae8a377 /Lib/email/_header_value_parser.py | |
parent | e0c0c7e8c9f8153a54b92e43aa3d09e69a9fd0c0 (diff) | |
download | cpython-f6713e84afc5addcfa8477dbdf2c027787f711c0.tar.gz cpython-f6713e84afc5addcfa8477dbdf2c027787f711c0.zip |
bpo-36520: Email header folded incorrectly (#13608)
* bpo-36520: reset the encoded word offset when starting a new
line during an email header folding operation
* 📜🤖 Added by blurb_it.
* bpo-36520: add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests
* bpo-36520: fix whitespace issue
* bpo-36520: changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue #" in comments
Diffstat (limited to 'Lib/email/_header_value_parser.py')
-rw-r--r-- | Lib/email/_header_value_parser.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index 35d746aa508..bb5ff8dc7e8 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -2789,6 +2789,7 @@ def _refold_parse_tree(parse_tree, *, policy): newline = _steal_trailing_WSP_if_exists(lines) if newline or part.startswith_fws(): lines.append(newline + tstr) + last_ew = None continue if not hasattr(part, 'encode'): # It's not a terminal, try folding the subparts. |