diff options
author | tkikuchi <> | 2005-12-17 05:11:44 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-12-17 05:11:44 +0000 |
commit | 75dee062afed5d1432820d897de3bcf3dc2e8238 (patch) | |
tree | c0cb18cab8ab2e89526fbefc04a5737d94a4bcf4 /Mailman/Handlers/Decorate.py | |
parent | 4fc195111db5d68eb97d259ed8bc67beae95302d (diff) | |
download | mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.tar.gz mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.tar.xz mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.zip |
Fixes for email.set_payload() not distinguish parsed or virgin payload.
I've tested the example by Mark Sapiro:
http://mail.python.org/pipermail/mailman-developers/2005-November/018395.html
both with and without 'Content-Transfer-Encoding' but may need more test.
Diffstat (limited to 'Mailman/Handlers/Decorate.py')
-rw-r--r-- | Mailman/Handlers/Decorate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py index afb0a1c9..03266fae 100644 --- a/Mailman/Handlers/Decorate.py +++ b/Mailman/Handlers/Decorate.py @@ -97,7 +97,12 @@ def process(mlist, msg, msgdata): uheader = unicode(header, lcset) ufooter = unicode(footer, lcset) try: - oldpayload = unicode(msg.get_payload(decode=1), mcset) + # First, check if the message was Scrubber-munged + if msg.get('x-mailman-scrubbed'): + decode = False + else: + decode = True + oldpayload = unicode(msg.get_payload(decode=decode), mcset) frontsep = endsep = u'' if header and not header.endswith('\n'): frontsep = u'\n' |