Re: Mangling mail archive "flat" links

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Mangling mail archive "flat" links
Дата
Msg-id CABUevExmn8iy+Z3-Q5t_pVtQwL81nmH4YwOv8BjOhv2uZT__QA@mail.gmail.com
обсуждение исходный текст
Ответ на Mangling mail archive "flat" links  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-www
On Mon, Aug 31, 2020 at 3:49 AM Thomas Munro <thomas.munro@gmail.com> wrote:
Hello,

It would be very nice if the archives didn't corrupt URLs like the one
at the bottom of this message:

https://www.postgresql.org/message-id/CA%2BhUKGJ8NRsqgkZEnsnRc2MFROBV-jCnacbYvtpptK2A9YYp9Q%40mail.gmail.com

I peeked in pgfilters.py and saw that there is a regular expression
designed to avoid mangling archives URLs, but it apparently doesn't
match the "flat" ones.

Yeah, that's clearly not great. I think this fix to ther regex is the right thing, it won't end up randomly missing other things now will it:

-_re_mail = re.compile(r'(/m(essage-id)?/)?[^()<>@,;:\/\s"\'&|]+@[^()<>@,;:\/\s"\'&|]+')
+_re_mail = re.compile(r'(/m(essage-id)?/(flat/)?)?[^()<>@,;:\/\s"\'&|]+@[^()<>@,;:\/\s"\'&|]+')

(it does still work for the ones I tested, but just to be on the safe side..)

--

В списке pgsql-www по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Mangling mail archive "flat" links
Следующее
От: Gregory
Дата:
Сообщение: Wiki editor request