This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mjpieters
Recipients barry, mjpieters, r.david.murray
Date 2018-12-21.01:11:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545354679.78.0.788709270274.issue35547@psf.upfronthosting.co.za>
In-reply-to
Content
That regex is incorrect, I should not post untested code from a mobile phone. Corrected workaround with more context:

import re
from email.policy import EmailPolicy

class UnfoldingEncodedStringHeaderPolicy(EmailPolicy):
    def header_fetch_parse(self, name, value):
        # remove any leading whitespace from header lines
        # that separates apparent encoded-word token before further processing 
        # using somewhat crude CRLF-FWS-between-encoded-word matching
        value = re.sub(r'(?<=\?=)((?:\r\n|[\r\n])[\t ]+)(?==\?)', '', value)
        return super().header_fetch_parse(name, value)
History
Date User Action Args
2018-12-21 01:11:19mjpieterssetrecipients: + mjpieters, barry, r.david.murray
2018-12-21 01:11:19mjpieterssetmessageid: <1545354679.78.0.788709270274.issue35547@psf.upfronthosting.co.za>
2018-12-21 01:11:19mjpieterslinkissue35547 messages
2018-12-21 01:11:19mjpieterscreate