Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16740/Handlers
Modified Files:
Tag: Release_2_1-maint
Scrubber.py ToDigest.py
Log Message:
fix bugs when using ARCHIVE_HTML_SANITIZER = 1
Index: Scrubber.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Scrubber.py,v
retrieving revision 2.18.2.8
retrieving revision 2.18.2.9
diff -u -d -r2.18.2.8 -r2.18.2.9
--- Scrubber.py 3 Oct 2004 06:00:32 -0000 2.18.2.8
+++ Scrubber.py 14 Oct 2004 08:05:06 -0000 2.18.2.9
@@ -309,7 +309,7 @@
# 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 @@
# 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:
Index: ToDigest.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/ToDigest.py,v
retrieving revision 2.22.2.6
retrieving revision 2.22.2.7
diff -u -d -r2.22.2.6 -r2.22.2.7
--- ToDigest.py 18 Sep 2004 06:48:46 -0000 2.22.2.6
+++ ToDigest.py 14 Oct 2004 08:05:06 -0000 2.22.2.7
@@ -314,7 +314,8 @@
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
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org