summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/CookHeaders.py
diff options
context:
space:
mode:
authortkikuchi2007-03-24 06:01:35 +0000
committertkikuchi2007-03-24 06:01:35 +0000
commita8b5ce78a7c5ec7c4e9dabfef37f83c153b53d36 (patch)
tree81805fe2fffca0ae3758662dfee1e336269e7cab /Mailman/Handlers/CookHeaders.py
parent8b83e896dfdbf349190fc9e70a258221907b7a84 (diff)
downloadmailman-a8b5ce78a7c5ec7c4e9dabfef37f83c153b53d36.tar.gz
mailman-a8b5ce78a7c5ec7c4e9dabfef37f83c153b53d36.tar.zst
mailman-a8b5ce78a7c5ec7c4e9dabfef37f83c153b53d36.zip
Diffstat (limited to 'Mailman/Handlers/CookHeaders.py')
-rw-r--r--Mailman/Handlers/CookHeaders.py23
1 files changed, 3 insertions, 20 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index 11f08acc8..7b5579fad 100644
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -281,27 +281,10 @@ def prefix_subject(mlist, msg, msgdata):
prefix = prefix % mlist.post_id
except TypeError:
pass
- # If charset is 'us-ascii', try to concatnate as string because there
- # is some weirdness in Header module (TK)
- if cset == 'us-ascii':
- try:
- if old_style:
- h = u' '.join([recolon, prefix, subject])
- else:
- h = u' '.join([prefix, recolon, subject])
- h = h.encode('us-ascii')
- h = uheader(mlist, h, 'Subject', continuation_ws=ws)
- del msg['subject']
- msg['Subject'] = h
- ss = u' '.join([recolon, subject])
- ss = ss.encode('us-ascii')
- ss = uheader(mlist, ss, 'Subject', continuation_ws=ws)
- msgdata['stripped_subject'] = ss
- return
- except UnicodeError:
- pass
# Get the header as a Header instance, with proper unicode conversion
- if old_style:
+ if not recolon:
+ h = uheader(mlist, prefix, 'Subject', continuation_ws=ws)
+ elif old_style:
h = uheader(mlist, recolon, 'Subject', continuation_ws=ws)
h.append(prefix)
else: