--- HyperArch.py 2009-03-17 17:19:44.000000000 +0100 +++ HyperArch.py.patched 2009-03-17 17:19:14.000000000 +0100 @@ -285,10 +285,10 @@ try: i18n.set_language(lang) if self.author == self.email: - self.author = self.email = re.sub('@', _(' at '), + self.author = self.email = re.sub(r'@[+-.\w]+', _(' at obscur.ed'), self.email) else: - self.email = re.sub('@', _(' at '), self.email) + self.email = re.sub(r'@[+-.\w]+', _(' at obscur.ed'), self.email) finally: i18n.set_translation(otrans) @@ -418,7 +418,7 @@ i18n.set_language(self._lang) atmark = unicode(_(' at '), Utils.GetCharSet(self._lang)) subject = re.sub(r'([-+,.\w]+)@([-+.\w]+)', - '\g<1>' + atmark + '\g<2>', subject) + '\g<1>' + atmark + 'obscur.ed', subject) finally: i18n.set_translation(otrans) self.decoded['subject'] = subject @@ -467,10 +467,10 @@ # TK: These two _url variables are used to compose a response # from the archive web page. So, ... d["subject_url"] = url_quote('Re: ' + self.subject) - d["in_reply_to_url"] = url_quote(self._message_id) + d["in_reply_to_url"] = 'obscur.ed' if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: # Point the mailto url back to the list - author = re.sub('@', _(' at '), self.author) + author = re.sub(r'@[+-.\w]+', _(' at obscur.ed'), self.author) emailurl = self._mlist.GetListEmail() else: author = self.author @@ -567,11 +567,11 @@ 'Date: %(datestr)s', 'Subject: %(subject)s'] if d['_in_reply_to']: - headers.append('In-Reply-To: %(_in_reply_to)s') + headers.append('In-Reply-To: obscur.ed') if d['_references']: - headers.append('References: %(_references)s') + headers.append('References: obscur.ed') if d['_message_id']: - headers.append('Message-ID: %(_message_id)s') + headers.append('Message-ID: obscur.ed') body = EMPTYSTRING.join(self.body) cset = Utils.GetCharSet(self._lang) # Coerce the body to Unicode and replace any invalid characters. @@ -583,7 +583,7 @@ atmark = unicode(_(' at '), cset) i18n.set_language(self._lang) body = re.sub(r'([-+,.\w]+)@([-+.\w]+)', - '\g<1>' + atmark + '\g<2>', body) + '\g<1>' + atmark + 'obscur.ed', body) finally: i18n.set_translation(otrans) # Return body to character set of article. @@ -1220,7 +1220,7 @@ author = self.get_header("author", article) if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: try: - author = re.sub('@', _(' at '), author) + author = re.sub(r'@[+-.\w]+', _(' at obscur.ed'), author) except UnicodeError: # Non-ASCII author contains '@' ... no valid email anyway pass @@ -1392,7 +1392,7 @@ text = jr.group(1) length = len(text) if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: - text = re.sub('@', atmark, text) + text = re.sub('@[+-.\w]+', atmark + u'obscur.ed', text) URL = self.maillist.GetScriptURL( 'listinfo', absolute=1) else: