Re: archive links broken?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL WWW Mailing List <pgsql-www(at)postgresql(dot)org>
Subject: Re: archive links broken?
Date: 2017-04-06 16:18:11
Message-ID: CABUevEzJ3RvmJ-bN_PW+Bae8T1gg+a4vgWvT=7hcg_yQ5HsWCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Thu, Apr 6, 2017 at 5:50 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> On Mon, Apr 3, 2017 at 10:04 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>
>> Magnus,
>>
>> * Magnus Hagander (magnus(at)hagander(dot)net) wrote:
>> > On Mon, Apr 3, 2017 at 9:01 PM, Stephen Frost <sfrost(at)snowman(dot)net>
>> wrote:
>> > > Do we have some hack to avoid screwing up links for
>> > > postgresql.org/message-id that needs to be updated to also look at
>> > > postgr.es/m/ links..?
>> >
>> > Ah yes, that's it. Right now it's loking for /message-id/<looks like an
>> > email address>. I guess we need to expand that to also handle the /m/
>> links.
>> >
>> > Should we do it for basically /(m|message-id/(xxxx), or do oyu think we
>> > need to actually limit it by the domain name as well? (We don't limit
>> the
>> > postgresql.org one, but /message-id/ might be more unusual?)
>>
>> I'd do one of two things- either not make assumptions about what other
>> domains do, or not hack up things that look like URLs and start with
>> either http:// or https:// ...
>>
>> I mean, we're already detecting that URLs are, well, URLs, right?
>> Otherwise, how are they showing up as links at all? Seems like it
>> should be possible to avoid mucking with anything that will end up
>> becoming a URL on the website.
>>
>
> That part uses the django urlize filter. The order is
> text|hideallmail|urlize, where hideallmail is the one that rewrites things.
> The urlize thing is a lot more complicated:
>
> https://github.com/django/django/blob/stable/1.8.x/django/utils/html.py
>
> So not making assumptions will be a *lot* easier :D
>
>
I've pushed a fix for that that does that. Seems to work AFAICT, but there
can still be some cached pages with old broken links around. They'll expire
in the not too distant future.

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

In response to

Browse pgsql-www by date

  From Date Subject
Next Message Bruce Momjian 2017-04-08 01:52:01 Re: [HACKERS] Small issue in online devel documentation build
Previous Message Magnus Hagander 2017-04-06 15:50:23 Re: archive links broken?