commit | 31e984c39cc7171f58878f772d0c9ad234893b2a | [log] [tgz] |
---|---|---|
author | R. David Murray <rdmurray@bitdance.com> | Fri Oct 01 15:40:20 2010 +0000 |
committer | R. David Murray <rdmurray@bitdance.com> | Fri Oct 01 15:40:20 2010 +0000 |
tree | c3cc50005e222313444af663ef8328ee4fc143ce | |
parent | 9e88b5aeee219c8b1968a29f206231cca2719ed3 [diff] [blame] |
#10004: in Q encoded word ignore '=xx' when xx is not valid hex. Bug report and fix by Thomas Guettler.
diff --git a/Lib/email/quoprimime.py b/Lib/email/quoprimime.py index 12df028..168dfff 100644 --- a/Lib/email/quoprimime.py +++ b/Lib/email/quoprimime.py
@@ -294,4 +294,4 @@ 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)