mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#10004: in Q encoded word ignore '=xx' when xx is not valid hex.
Bug report and fix by Thomas Guettler.
This commit is contained in:
parent
9e88b5aeee
commit
31e984c39c
3 changed files with 10 additions and 1 deletions
|
@ -294,4 +294,4 @@ def header_decode(s):
|
|||
the high level email.header class for that functionality.
|
||||
"""
|
||||
s = s.replace('_', ' ')
|
||||
return re.sub(r'=\w{2}', _unquote_match, s, re.ASCII)
|
||||
return re.sub(r'=[a-fA-F0-9]{2}', _unquote_match, s, re.ASCII)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue