Merged revisions 85142 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85142 | r.david.murray | 2010-10-01 11:40:20 -0400 (Fri, 01 Oct 2010) | 5 lines

  #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 bf28d39..85efc08 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)