aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authortkikuchi <>2005-07-13 07:04:09 +0000
committertkikuchi <>2005-07-13 07:04:09 +0000
commit01468e7eae8d44d740edcf2dbaa2d1575c02c7a7 (patch)
treef97fc85a36ad697da873287db5a43b933bf828e3 /Mailman/Handlers
parent31559396f740d6c2bea564db473776e48b5f1b61 (diff)
downloadmailman2-01468e7eae8d44d740edcf2dbaa2d1575c02c7a7.tar.gz
mailman2-01468e7eae8d44d740edcf2dbaa2d1575c02c7a7.tar.xz
mailman2-01468e7eae8d44d740edcf2dbaa2d1575c02c7a7.zip
Introduce new attribute (collapse_alternatives) to allow HTML in
multipart/alternative message after content filtering.
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/MimeDel.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py
index 79efa620..3afdce95 100644
--- a/Mailman/Handlers/MimeDel.py
+++ b/Mailman/Handlers/MimeDel.py
@@ -90,10 +90,12 @@ def process(mlist, msg, msgdata):
# headers. For now we'll move the subpart's payload into the outer part,
# and then copy over its Content-Type: and Content-Transfer-Encoding:
# headers (any others?).
- collapse_multipart_alternatives(msg)
- if ctype == 'multipart/alternative':
- firstalt = msg.get_payload(0)
- reset_payload(msg, firstalt)
+ # TK: Make this configurable from Gui/ContentFilter.py.
+ if mlist.collapse_alternatives:
+ collapse_multipart_alternatives(msg)
+ if ctype == 'multipart/alternative':
+ firstalt = msg.get_payload(0)
+ reset_payload(msg, firstalt)
# If we removed some parts, make note of this
changedp = 0
if numparts <> len([subpart for subpart in msg.walk()]):