diff options
| author | R. David Murray <rdmurray@bitdance.com> | 2010-10-01 15:40:20 (GMT) |
|---|---|---|
| committer | R. David Murray <rdmurray@bitdance.com> | 2010-10-01 15:40:20 (GMT) |
| commit | 31e984c39cc7171f58878f772d0c9ad234893b2a (patch) | |
| tree | c3cc50005e222313444af663ef8328ee4fc143ce /Lib/email/test/test_email.py | |
| parent | 9e88b5aeee219c8b1968a29f206231cca2719ed3 (diff) | |
| download | cpython-31e984c39cc7171f58878f772d0c9ad234893b2a.zip cpython-31e984c39cc7171f58878f772d0c9ad234893b2a.tar.gz cpython-31e984c39cc7171f58878f772d0c9ad234893b2a.tar.bz2 | |
#10004: in Q encoded word ignore '=xx' when xx is not valid hex.
Bug report and fix by Thomas Guettler.
Diffstat (limited to 'Lib/email/test/test_email.py')
| -rw-r--r-- | Lib/email/test/test_email.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index e18ffaf..b6e4831 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1659,6 +1659,12 @@ Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?= dh = decode_header(s % q) self.assertEqual(dh, [(a, 'iso-8859-1')]) + def test_rfc2047_Q_invalid_digits(self): + # issue 10004. + s = '=?iso-8659-1?Q?andr=e9=zz?=' + self.assertEqual(decode_header(s), + [(b'andr\xe9=zz', 'iso-8659-1')]) + # Test the MIMEMessage class class TestMIMEMessage(TestEmailBase): |
