[3.14] gh-134152: Fix UnboundLocalError in email._header_value_parser _get_ptext_to_endchars (GH-134233) (#134678)

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
This commit is contained in:
Miss Islington (bot) 2025-05-26 10:02:52 +02:00 committed by GitHub
parent ebfd18b3f0
commit 1ce68f6297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 0 deletions

View file

@ -1020,6 +1020,8 @@ def _get_ptext_to_endchars(value, endchars):
a flag that is True iff there were any quoted printables decoded.
"""
if not value:
return '', '', False
fragment, *remainder = _wsp_splitter(value, 1)
vchars = []
escape = False