summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw2002-10-29 21:50:40 +0000
committerbwarsaw2002-10-29 21:50:40 +0000
commitda8127cd5ed1133fa5a49b0758f0105bebc894e6 (patch)
tree856f35a3664e5013efbaabeed00ab56915196ccd /Mailman/Utils.py
parent6b29fc6e9a078661011d1fc4cfe0536f6864107a (diff)
downloadmailman-da8127cd5ed1133fa5a49b0758f0105bebc894e6.tar.gz
mailman-da8127cd5ed1133fa5a49b0758f0105bebc894e6.tar.zst
mailman-da8127cd5ed1133fa5a49b0758f0105bebc894e6.zip
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 024adf745..3226a154f 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -664,7 +664,7 @@ def midnight(date=None):
def to_dollar(s):
"""Convert from %-strings to $-strings."""
- s = s.replace('$', '$$')
+ s = s.replace('$', '$$').replace('%%', '%')
parts = cre.split(s)
for i in range(1, len(parts), 2):
if parts[i+1] and parts[i+1][0] in IDENTCHARS:
@@ -676,7 +676,7 @@ def to_dollar(s):
def to_percent(s):
"""Convert from $-strings to %-strings."""
- s = s.replace('%', '%%')
+ s = s.replace('%', '%%').replace('$$', '$')
parts = dre.split(s)
for i in range(1, len(parts), 4):
if parts[i] is not None: