aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi
diff options
context:
space:
mode:
authorMark Sapiro <msapiro@value.net>2011-05-10 18:57:55 -0700
committerMark Sapiro <msapiro@value.net>2011-05-10 18:57:55 -0700
commit1106fc19e5b1300ca5eb5482d559eb749305b456 (patch)
treec666602dbf6d096266bb6819234a58989711cb99 /Mailman/Cgi
parent168f74f5b381070879789f8b6c4e4ee8b599dbd6 (diff)
downloadmailman2-1106fc19e5b1300ca5eb5482d559eb749305b456.tar.gz
mailman2-1106fc19e5b1300ca5eb5482d559eb749305b456.tar.xz
mailman2-1106fc19e5b1300ca5eb5482d559eb749305b456.zip
Fixed a problem in admindb.py where the character set for the display of
the message body excerpt was not correctly determined. Bug #779751.
Diffstat (limited to 'Mailman/Cgi')
-rw-r--r--Mailman/Cgi/admindb.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py
index 4513e8e3..639f64cc 100644
--- a/Mailman/Cgi/admindb.py
+++ b/Mailman/Cgi/admindb.py
@@ -631,7 +631,14 @@ def show_post_requests(mlist, id, info, total, count, form):
else:
body = EMPTYSTRING.join(lines)
# Get message charset and try encode in list charset
- mcset = msg.get_param('charset', 'us-ascii').lower()
+ # We get it from the first text part.
+ for part in msg.walk():
+ if part.get_content_maintype() == 'text':
+ # Watchout for charset= with no value.
+ mcset = part.get_content_charset() or 'us-ascii'
+ break
+ else:
+ mcset = 'us-ascii'
lcset = Utils.GetCharSet(mlist.preferred_language)
if mcset <> lcset:
try: