Skip site navigation (1) Skip section navigation (2)

Re: BUG #7844: xpath missing entity decoding - bug or feature

From: Dan Scott <denials(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: BUG #7844: xpath missing entity decoding - bug or feature
Date: 2013-11-04 17:32:04
Message-ID: CAAY5AM1L83y79rtOZAUJioREO6n4=XAFKcGu6qO3hCZE1yJytg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Sept 09, 2013 Bruce Momjian wrote:
>On Fri, Feb  1, 2013 at 12:02:41PM +0000, info(at)fduerr(dot)de wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference:      7844
>> Logged by:          fduerr
>> Email address:      info(at)fduerr(dot)de
>> PostgreSQL version: 9.2.2
>> Operating system:   Debian
>> Description:
>>
>> Up until 9.1
>>
>> select (xpath('/z/text()', ('<z>' || 'AT&amp;T' || '</z>')::xml))[1];
>>
>> returned 'AT&T'
>> 9.2 returns 'AT&amp;T'
>>
>> Is it a bug or a feature?
>> Is there a function to decode xml-entities?
>
>Does anyone have a comment on this?

Yes, the Evergreen project just ran into this change of behaviour and consider
it a bug.

https://bugs.launchpad.net/evergreen/+bug/1243023 tells the tale, but in short
the XPath spec states in "5.2 Element Nodes":

"Entity references to both internal and external entities are expanded.
Character references are resolved." (http://www.w3.org/TR/xpath/)

So we believe that the extracted text node children of element nodes should be
resolved when we retrieve them, as they were in 9.1 and before.


Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2013-11-04 18:44:28
Subject: Re: BUG #7844: xpath missing entity decoding - bug or feature
Previous:From: Amit KapilaDate: 2013-11-04 15:41:51
Subject: Re: [BUGS] BUG #8573: int4range memory consumption

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group