New submission from Fred Drake <fdr...@gmail.com>:
I've encountered a problem parsing an email with this Subject: header: Subject: Be sure to redeem your =?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year email._header_value_parser.get_unstructured defers to get_encoded_word, passing the argument '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year' get_encoded_word eventually calls email._encoded_words.decode with the argument '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year?=' This doesn't seem right, but I'm unsure of the syntactic priority of =XX and ?= in this case. The policy for this is email.policy.SMTP + email.policy.strict (not sure if that's ideal; I'm retrieving messages from mbox files and over IMAP). ---------- assignee: r.david.murray messages: 355564 nosy: barry, fdrake, r.david.murray priority: normal severity: normal status: open title: Bad decoding of encoded-words in unstructured email headers _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38621> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com