summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
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: