Mangling of /message-id/flat links

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: pgsql-www(at)postgresql(dot)org
Subject: Mangling of /message-id/flat links
Date: 2016-02-02 21:38:31
Message-ID: CAEepm=0HTyLXf_HcZuew2MGDYaipoVBM9Nj5bXq7EGcQ4v=S+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Hi

The archives mangled a URL in the following message:

http://www.postgresql.org/message-id/CAEepm=03=BT=NSEbufQ6JTvWVC2fm3jyddLfUi66fn2cJ727rw@mail.gmail.com

Perhaps the pattern needs tweaking, something like this?

diff --git a/django/archives/mailarchives/templatetags/pgfilters.py
b/django/archives/mailarchives/templatetags/pgfilters.py
index 337a1a3..577ff03 100644
--- a/django/archives/mailarchives/templatetags/pgfilters.py
+++ b/django/archives/mailarchives/templatetags/pgfilters.py
@@ -23,7 +23,7 @@ def hidemail(value):
#
# Those are not email addresses, so ignore them. The links won't work if they
# are mangled.
-_re_mail = re.compile('(/message-id/)?[^()<>@,;:\/\s"\'&|]+(at)[^()<>@,;:\/\s"\'&|]+')
+_re_mail = re.compile('(/message-id/|/message-id/flat/)?[^()<>@,;:\/\s"\'&|]+(at)[^()<>@,;:\/\s"\'&|]+')
def _rewrite_email_match(match):
if match.group(1):
return match.group(0) # was preceded by /message-id/

Or perhaps, instead of trying to recognise URLs that point back into
the archives, it shouldn't mangle anything that looks like a URL.

--
Thomas Munro
http://www.enterprisedb.com

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Daniel Gustafsson 2016-02-09 15:53:06 Small typo on support/security
Previous Message Stefan Kaltenbrunner 2016-02-02 18:42:21 Re: Typo in Stream Replication howto?