diff options
author | tkikuchi <> | 2005-03-28 01:37:51 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-03-28 01:37:51 +0000 |
commit | a360de383fd9e50f5ca008ef40c37e74ecaee488 (patch) | |
tree | 4da297a3924c77e55cd32851c1acbf85f0f09c1a | |
parent | ad8b5bb659b7a91742b0002d9f113556d748ed0f (diff) | |
download | mailman2-a360de383fd9e50f5ca008ef40c37e74ecaee488.tar.gz mailman2-a360de383fd9e50f5ca008ef40c37e74ecaee488.tar.xz mailman2-a360de383fd9e50f5ca008ef40c37e74ecaee488.zip |
Username may contain non-ascii character for English-US.
Fall back to email address.
-rw-r--r-- | Mailman/Handlers/Decorate.py | 6 |
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) |