------------------------------------------------------------
revno: 1054
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Sun 2009-04-19 15:23:55 -0700
message:
  Scrubbed HTML attachments containing tab characters would get the tabs
  replaced by a string of '&nbsp' without a semicolon.  Fixed.
modified:
  Mailman/Handlers/Scrubber.py
  NEWS
    ------------------------------------------------------------
    revno: 1027.1.1
    committer: Paul Kenneth Fisher <[email protected]>
    branch nick: mm22
    timestamp: Sun 2009-01-04 22:58:24 -0500
    message:
      Fix tab expansion.
    modified:
      Mailman/Handlers/Scrubber.py

=== modified file 'Mailman/Handlers/Scrubber.py'
--- Mailman/Handlers/Scrubber.py        2009-01-13 18:53:19 +0000
+++ Mailman/Handlers/Scrubber.py        2009-04-19 22:23:55 +0000
@@ -262,7 +262,7 @@
                 # mono-space font.  Still looks hideous to me, but then I'd
                 # just as soon discard them.
                 def doreplace(s):
-                    return s.replace(' ', '&nbsp;').replace('\t', '&nbsp'*8)
+                    return s.expandtabs(8).replace(' ', '&nbsp;')
                 lines = [doreplace(s) for s in payload.split('\n')]
                 payload = '<tt>\n' + BR.join(lines) + '\n</tt>\n'
                 part.set_payload(payload)

=== modified file 'NEWS'
--- NEWS        2009-04-18 21:00:43 +0000
+++ NEWS        2009-04-19 22:23:55 +0000
@@ -44,6 +44,9 @@
 
   Bug fixes and other patches
 
+    - Scrubbed HTML attachments containing tab characters would get the tabs
+      replaced by a string of '&nbsp' without a semicolon.  Fixed.
+
     - Caught a TypeError in content filtering, collapse alternatives that
       occurred with a malformed message if a multipart/alternative part
       wasn't multi-part.  Reported in comments to bug #266230.



--
Active development version (web u/i update)
https://code.launchpad.net/~mailman-coders/mailman/2.2

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to