There has been a longstanding issue of entities being handled in a confusing way. I agree the new approach is better, the problem is that people have coded around the old behavior, and the new change will break their old workarounds.
Full entity decoding should be done in some sort of efficient fashion in c. You are free to hack it in some other way though, just make sure to make it optional and thoroughly document how it works.
It is the same if you had cdata to start with. I don't believe ampersand by itself triggered cdata. There is no need from my point of view.
Note that the specs say otherwise, but the module has never followed specs, nor should it.
Do as you wish though, just don't be surprised if you change default behavior and people complain.
Nigel Metheringham via RT <bug-XML-Bare@rt.cpan.org> wrote:
Show quoted text> Queue: XML-Bare
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=75220 >
>
>On Fri Feb 24 17:58:49 2012, livxtrm@codechild.com wrote:
>> Equivalent is not same. It should be the same. Make the new behavior
>> an option please. It is not desirable to change the behavior.
>
>It has *never* been the same for any XML input containing a character within [<>&;]
>as that triggers CDATA output in obj2xml.
>
>In versions prior to 0.47 there was no translation on parsing, so the output
>was neither identical or equivalent if there were any XML escapes in the input.
>
>In 0.47 output is equivalent for XML escapes, but it does not handle any other
>entities - mainly because it gets too damn difficult to work out the correct
>behaviour - ie (X)HTML different to straight XML.
>
>Can certainly make it optional. Wondering if there also needs to be an option for
>full entity decode (probably by allowing a callout).
>