From 52125faf8c16745bb47ec0b9cce2740c2d7eda8d Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 6 Apr 2017 18:09:18 +0200 Subject: [PATCH] Try to avoid rewriting message links using the postgr.es syntax --- django/archives/mailarchives/templatetags/pgfilters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/archives/mailarchives/templatetags/pgfilters.py b/django/archives/mailarchives/templatetags/pgfilters.py index 9f97119..6dd68a9 100644 --- a/django/archives/mailarchives/templatetags/pgfilters.py +++ b/django/archives/mailarchives/templatetags/pgfilters.py @@ -20,10 +20,11 @@ def hidemail(value): # mailing list archives: # # https://www.postgresql.org/message-id/1asd21das@mail.gmail.com +# https://postgr.es/m/1asd21das@mail.gmail.com # # Those are not email addresses, so ignore them. The links won't work if they # are mangled. -_re_mail = re.compile('(/message-id/)?[^()<>@,;:\/\s"\'&|]+@[^()<>@,;:\/\s"\'&|]+') +_re_mail = re.compile('(/m(essage-id)?/)?[^()<>@,;:\/\s"\'&|]+@[^()<>@,;:\/\s"\'&|]+') def _rewrite_email_match(match): if match.group(1): return match.group(0) # was preceded by /message-id/ -- 2.39.5