diff options
| author | bwarsaw | 1999-04-09 01:20:36 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-04-09 01:20:36 +0000 |
| commit | f4f385faa7c82f8b70e3bb2ceafa538819263241 (patch) | |
| tree | c74ae7b460cc2f75c553b5dfe58f261122154cfd /Mailman/ListAdmin.py | |
| parent | 7ce512fd70a64eb7cf9563bb31dd4291a44254dd (diff) | |
| download | mailman-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.py | 18 |
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: |
