aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/Utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 847e450e..9a29662b 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -425,7 +425,15 @@ def check_global_password(response, siteadmin=True):
_ampre = re.compile('&((?:#[0-9]+|[a-z]+);)', re.IGNORECASE)
+# Characters misinterpreted as < or > by some broken browsers.
+_broken_browser = {'\x8b': '&#8249;',
+ '\x9b': '&#8250;',
+ '\xbc': '&#188;',
+ '\xbd': '&#190;',
+ }
def websafe(s):
+ 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))