diff options
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r-- | Mailman/Handlers/Scrubber.py | 5 | ||||
-rw-r--r-- | Mailman/Handlers/ToDigest.py | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index 7429c0b4..6116806b 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -309,7 +309,7 @@ Url : %(url)s # We still have to sanitize multipart messages to flat text because # Pipermail can't handle messages with list payloads. This is a kludge; # def (n) clever hack ;). - if msg.is_multipart(): + if msg.is_multipart() and sanitize <> 2: # By default we take the charset of the first text/plain part in the # message, but if there was none, we'll use the list's preferred # language's charset. @@ -402,7 +402,8 @@ def save_attachment(mlist, msg, dir, filter_html=True): # For safety, we should confirm this is valid ext for content-type # but we can use fnext if we introduce fnext filtering if mm_cfg.SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION: - ext = fnext + # HTML message doesn't have filename :-( + ext = fnext or guess_extension(ctype, fnext) else: ext = guess_extension(ctype, fnext) if not ext: diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py index f350768e..2f64b369 100644 --- a/Mailman/Handlers/ToDigest.py +++ b/Mailman/Handlers/ToDigest.py @@ -314,7 +314,8 @@ def send_i18n_digests(mlist, mboxfp): uh = '\n\t'.join(uh.split('\n')) print >> plainmsg, uh print >> plainmsg - payload = msg.get_payload(decode=True) + payload = msg.get_payload(decode=True)\ + or msg.as_string().split('\n\n',1)[1] print >> plainmsg, payload if not payload.endswith('\n'): print >> plainmsg |