aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mailman/Utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 9a29662b..4a9f34a6 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -432,8 +432,11 @@ _broken_browser = {'\x8b': '‹',
'\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))