Re: pgarchives: strip angle brackets when checking for msgid search

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Amir Rohan <amir(dot)rohan(at)zoho(dot)com>
Cc: PostgreSQL www <pgsql-www(at)postgresql(dot)org>
Subject: Re: pgarchives: strip angle brackets when checking for msgid search
Date: 2015-10-03 16:31:57
Message-ID: CABUevEw-VKrQm3M7zLOmwBeRjp+MgafxHKzE0zgaDM65PyrsCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Fri, Oct 2, 2015 at 7:29 PM, Amir Rohan <amir(dot)rohan(at)zoho(dot)com> wrote:

> In some email-clients, when you copy the Message-ID to the clipboard
> it surrounds in (or perhaps, doesn't strip) angle brackets.
> When pasting this into the mail archive search, search fails to find the
> message
> and this happens often enough so as to be annoying. The fix is trivial.
>
> Discussion of similar problem in the commitfest app:
>
> <CABUevExRGr+Q5gzp-9cDLOqgntsOEcM0zZYg5VkADj3Z_NKz5A(at)mail(dot)gmail(dot)com>
> <CABUevExRGr+Q5gzp-9cDLOqgntsOEcM0zZYg5VkADj3Z_NKz5A(at)mail(dot)gmail(dot)com>
>
> patch attached.
>

Interesting - we also had a similar fix in 9b7e9b59 for the archives, but
that one only deals with the URLs and not the search box. Makes much sense
to do it in the search box as well, so applied. Thanks!

Actually, before I sent this. It's also broken because it redirects to bad
URLs if there are spaces in it. Or if there is just one of the two, e.g. it
has < but not >. All those now generate 404s, which is not good.

This patch needs to be in sync with the callers of that API as well as the
code that actually views entries in the archives before it can be safely
applied.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Amir Rohan 2015-10-03 17:42:16 Re: pgarchives: strip angle brackets when checking for msgid search
Previous Message Magnus Hagander 2015-10-03 11:05:06 Re: Deselecting "Receive Mail" on the website ml subscribe form is broken