BUG #4822: xmlattributes encodes '&' twice - Mailing list pgsql-bugs

From Itagaki Takahiro
Subject BUG #4822: xmlattributes encodes '&' twice
Date
Msg-id 200905250939.n4P9ddaf064351@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4822: xmlattributes encodes '&' twice  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4822
Logged by:          Itagaki Takahiro
Email address:      itagaki.takahiro@oss.ntt.co.jp
PostgreSQL version: 8.4dev
Operating system:   Linux, Windows
Description:        xmlattributes encodes '&' twice
Details:

=# SELECT xmlelement(name a, xmlattributes('./qa?a=1&b=2' as href), 'Q&A');
                 xmlelement
--------------------------------------------
 <a href="./qa?a=1&amp;b=2">Q&A</a>
(1 row)

'&' in xmlattributes seems to be encoded twice.
( '&' => '&' => '&amp;' )

The bug only exists in 8.4dev;
PostgreSQL 8.3 correctly encodes '&' only once.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4821: LIKE '%_' fails
Next
From: "Shulamit otzer"
Date:
Subject: BUG #4823: problems downloading