aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Archiver/HyperArch.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/Archiver/HyperArch.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py
index 0440dc6d..84e04856 100644
--- a/Mailman/Archiver/HyperArch.py
+++ b/Mailman/Archiver/HyperArch.py
@@ -406,6 +406,15 @@ class Article(pipermail.Article):
if email:
self.decoded['email'] = email
if subject:
+ if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
+ otrans = i18n.get_translation()
+ try:
+ i18n.set_language(self._lang)
+ atmark = unicode(_(' at '), Utils.GetCharSet(self._lang))
+ subject = re.sub(r'([-+,.\w]+)@([-+.\w]+)',
+ '\g<1>' + atmark + '\g<2>', subject)
+ finally:
+ i18n.set_translation(otrans)
self.decoded['subject'] = subject
self.decoded['stripped'] = self.strip_subject(subject or self.subject)