Message332277
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) |
|
Date |
User |
Action |
Args |
2018-12-21 01:11:19 | mjpieters | set | recipients:
+ mjpieters, barry, r.david.murray |
2018-12-21 01:11:19 | mjpieters | set | messageid: <1545354679.78.0.788709270274.issue35547@psf.upfronthosting.co.za> |
2018-12-21 01:11:19 | mjpieters | link | issue35547 messages |
2018-12-21 01:11:19 | mjpieters | create | |
|