From 6dc49d3d22ea2c5fc839826bc2f9ee7ba362f2ca Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 19 Dec 2008 12:23:41 -0800 Subject: Fixed an issue where in some circumstances HyperArch.py would translate ' at ' into the wrong language ultimately throwing a UnicodeDecodeError when the translation was decoded with a different character set. Bug #308152. --- Mailman/Archiver/HyperArch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Mailman') diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index d4fc5d9a..33a389ed 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -574,8 +574,8 @@ class Article(pipermail.Article): if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: otrans = i18n.get_translation() try: - atmark = unicode(_(' at '), cset) i18n.set_language(self._lang) + atmark = unicode(_(' at '), cset) body = re.sub(r'([-+,.\w]+)@([-+.\w]+)', '\g<1>' + atmark + '\g<2>', body) finally: -- cgit v1.2.3