Adding re.DOTALL to catch potentially folded lines and fixed formatting
This commit is contained in:
parent
a4532294ae
commit
84b96e1daa
@ -243,7 +243,8 @@ class MaildirFolder(BaseFolder):
|
|||||||
# quoted boundaries.
|
# quoted boundaries.
|
||||||
try: boundary_field = \
|
try: boundary_field = \
|
||||||
re.search(b"content-type:.*(boundary=[\"]?[A-Za-z0-9'()+_,-./:=? ]+[\"]?)",
|
re.search(b"content-type:.*(boundary=[\"]?[A-Za-z0-9'()+_,-./:=? ]+[\"]?)",
|
||||||
re.split(b'[\r]?\n[\r]?\n',raw_msg_bytes)[0],re.IGNORECASE).group(1)
|
re.split(b'[\r]?\n[\r]?\n', raw_msg_bytes)[0],
|
||||||
|
(re.IGNORECASE|re.DOTALL)).group(1)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# No match
|
# No match
|
||||||
return raw_msg_bytes
|
return raw_msg_bytes
|
||||||
|
Loading…
Reference in New Issue
Block a user