summaryrefslogtreecommitdiff
path: root/Mailman/ListAdmin.py
diff options
context:
space:
mode:
authorbwarsaw1999-04-09 01:20:36 +0000
committerbwarsaw1999-04-09 01:20:36 +0000
commitf4f385faa7c82f8b70e3bb2ceafa538819263241 (patch)
treec74ae7b460cc2f75c553b5dfe58f261122154cfd /Mailman/ListAdmin.py
parent7ce512fd70a64eb7cf9563bb31dd4291a44254dd (diff)
downloadmailman-f4f385faa7c82f8b70e3bb2ceafa538819263241.tar.gz
mailman-f4f385faa7c82f8b70e3bb2ceafa538819263241.tar.zst
mailman-f4f385faa7c82f8b70e3bb2ceafa538819263241.zip
HandlePostRequest(): Quote %'s in the Subject: header too!
Diffstat (limited to 'Mailman/ListAdmin.py')
-rw-r--r--Mailman/ListAdmin.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py
index 090bb6ce8..6db0d405b 100644
--- a/Mailman/ListAdmin.py
+++ b/Mailman/ListAdmin.py
@@ -147,17 +147,19 @@ class ListAdmin:
else:
# Discard.
rejection = "Discarded"
+
+ def strquote(s):
+ return string.replace(s, '%', '%%')
+
if rejection:
note = '''%(listname)s: %(rejection)s posting:
\tFrom: %(sender)s
-\tSubject: %(subject)s''' % {'listname' : self._internal_name,
- 'rejection': rejection,
- 'sender' : msg.GetSender(),
- 'subject' : msg.getheader('subject', '<none>'),
- }
- def strquote(s):
- return string.replace(s, '%', '%%')
-
+\tSubject: %(subject)s''' % {
+ 'listname' : self._internal_name,
+ 'rejection': rejection,
+ 'sender' : msg.GetSender(),
+ 'subject' : strquote(msg.getheader('subject', '<none>')),
+ }
if data[1]:
note = note + '\n\tHeld: ' + strquote(data[1])
if comment: