summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw2002-11-18 20:54:36 +0000
committerbwarsaw2002-11-18 20:54:36 +0000
commit686741b63b4b94a712931b4bfefd161f3c5ae5bb (patch)
treed561effe48d24b5d8d9f0c1cc47ee4e188badd6b /Mailman/Utils.py
parentafd5c20a5f577aa1e09500680d70460a2d61e6f0 (diff)
downloadmailman-686741b63b4b94a712931b4bfefd161f3c5ae5bb.tar.gz
mailman-686741b63b4b94a712931b4bfefd161f3c5ae5bb.tar.zst
mailman-686741b63b4b94a712931b4bfefd161f3c5ae5bb.zip
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 52ea90471..7b2729c4e 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -777,12 +777,15 @@ def uncanonstr(s, lang=None):
return s
except UnicodeError:
# Nope, it contains funny characters, so html-ref it
- a = []
- for c in s:
- o = ord(c)
- if o > 127:
- a.append('&#%3d;' % o)
- else:
- a.append(c)
- # Join characters together and coerce to byte string
- return str(EMPTYSTRING.join(a))
+ return uquote(s)
+
+def uquote(s):
+ a = []
+ for c in s:
+ o = ord(c)
+ if o > 127:
+ a.append('&#%3d;' % o)
+ else:
+ a.append(c)
+ # Join characters together and coerce to byte string
+ return str(EMPTYSTRING.join(a))