diff options
author | tkikuchi <> | 2005-10-31 04:39:25 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-10-31 04:39:25 +0000 |
commit | a68aa926bb30d46adb47fa6efc3b20b4012eaac4 (patch) | |
tree | 506dac2042d7be31cae35f5151dd28c2d5c221fa /Mailman/Archiver | |
parent | 592a4abe4b6229e37956560ee7240cc7a9ce444d (diff) | |
download | mailman2-a68aa926bb30d46adb47fa6efc3b20b4012eaac4.tar.gz mailman2-a68aa926bb30d46adb47fa6efc3b20b4012eaac4.tar.xz mailman2-a68aa926bb30d46adb47fa6efc3b20b4012eaac4.zip |
Obscure email address in the subject line.
Diffstat (limited to 'Mailman/Archiver')
-rw-r--r-- | Mailman/Archiver/HyperArch.py | 9 |
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) |