aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mailman/Handlers/Decorate.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index 64ba8155..433629c6 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -53,10 +53,10 @@ def process(mlist, msg, msgdata):
# BAW: Hmm, should we allow this?
d['user_password'] = mlist.getMemberPassword(member)
d['user_language'] = mlist.getMemberLanguage(member)
- username = mlist.getMemberName(member)
- if username:
+ username = mlist.getMemberName(member) or None
+ try:
username = username.encode(Utils.GetCharSet(d['user_language']))
- else:
+ except (AttributeError, UnicodeEncodeError):
username = member
d['user_name'] = username
d['user_optionsurl'] = mlist.GetOptionsURL(member)