From f4f385faa7c82f8b70e3bb2ceafa538819263241 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 9 Apr 1999 01:20:36 +0000 Subject: HandlePostRequest(): Quote %'s in the Subject: header too! --- Mailman/ListAdmin.py | 18 ++++++++++-------- 1 file 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', ''), - } - def strquote(s): - return string.replace(s, '%', '%%') - +\tSubject: %(subject)s''' % { + 'listname' : self._internal_name, + 'rejection': rejection, + 'sender' : msg.GetSender(), + 'subject' : strquote(msg.getheader('subject', '')), + } if data[1]: note = note + '\n\tHeld: ' + strquote(data[1]) if comment: -- cgit v1.2.3-70-g09d2