#18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=

The problem was I was only checking for decimal digits after the third '?',
not for *hex* digits :(.

This changeset also fixes a couple of comment typos, deletes an unused
function relating to encoded word parsing, and removed an invalid
'if' test from the folding function that was revealed by the tests
written to validate this issue.
This commit is contained in:
R David Murray 2013-07-11 15:52:57 -04:00
parent 3641a74e1c
commit 65171b28e7
5 changed files with 62 additions and 40 deletions

View file

@ -170,6 +170,15 @@ class TestParser(TestParserMixin, TestEmailBase):
[],
'')
def test_get_encoded_word_quopri_utf_escape_follows_cte(self):
# Issue 18044
self._test_get_x(parser.get_encoded_word,
'=?utf-8?q?=C3=89ric?=',
'Éric',
'Éric',
[],
'')
# get_unstructured
def _get_unst(self, value):