mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#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:
parent
3641a74e1c
commit
65171b28e7
5 changed files with 62 additions and 40 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue