------------------------------------------------------------
revno: 1299
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Tue 2011-04-26 00:21:07 -0700
message:
Don't try converting non-ascii to HTML entities in unicode.
modified:
Mailman/Utils.py
--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1
Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Utils.py'
--- Mailman/Utils.py 2011-04-25 23:26:13 +0000
+++ Mailman/Utils.py 2011-04-26 07:21:07 +0000
@@ -432,8 +432,11 @@
'\xbd': '¾',
}
def websafe(s):
- for k in _broken_browser:
- s = s.replace(k, _broken_browser[k])
+ # Archiver can pass unicode here. Just skip them as the
+ # archiver escapes non-ascii anyway.
+ if isinstance(s, str):
+ for k in _broken_browser:
+ s = s.replace(k, _broken_browser[k])
# Don't double escape html entities
return _ampre.sub(r'&\1', cgi.escape(s, quote=True))
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org