Re: escapes in submitted docs comments

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-www(at)postgresql(dot)org
Subject: Re: escapes in submitted docs comments
Date: 2017-02-15 11:52:01
Message-ID: 20170215115201.qahrd3cpv3ovkycb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Daniel Gustafsson wrote:
> > On 02 Feb 2017, at 22:47, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> >
> > The docs comments coming in through pgsql-docs look like this:
> >
> > select instr(&#39;010000101001001&#39;,&#39;1&#39;,-1) from dual
> >
> > Can the escaping be fixed?
>
> AFAIU with Django, to avoid the escaping the form content would have to be
> marked safe which seems.. unsafe. Given the nature of SQL and the comments we
> get, perhaps the simple approach is to just replace the unicode quote since it
> will be quite common? Something along the lines of the (untested) diff below?

There are plenty of other characters being escaped, though. Can't we
just do something like "parse this html piece as text" instead?
("unescape" I suppose). We're only sending it in a text/plain email, so
there's no worry of misinterpreted HTML.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Christoph Berg 2017-02-15 12:12:19 New apt repo key version
Previous Message Daniel Gustafsson 2017-02-15 10:08:43 Re: escapes in submitted docs comments