After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316489 - SAX2: & entity translated in &#38 for attribute's value (expected just '&')
SAX2: & entity translated in &#38 for attribute's value (expected just '&')
Status: RESOLVED DUPLICATE of bug 316487
Product: libxml2
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-16 16:12 UTC by abolgar
Modified: 2005-09-16 16:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description abolgar 2005-09-16 16:12:20 UTC
Please describe the problem:
If the attribute's value contains '&' entity then in SAX startElement
handler I get & Though, I expect to get just '&' symbol, like in characters
handler, if char data contains & entity. Is there any way to get FULLY
translated & entity to '&' for attribute's value?
BTW, Expat translates it to '&'.

Steps to reproduce:
1. Create the following XML file:

<?xml version="1.0" encoding="UTF-8"?>
<csta:connID>
  <a attr="AT&amp;T">R&amp;D</a>
</csta:connID>

2. Run testSAX program with this XML file.
3. See the output for attribute a:

SAX.startElement(a, attr='AT&#38;T')



Actual results:


Expected results:
I would like to see

SAX.startElement(a, attr='AT&T')

Does this happen every time?
Yep

Other information:
Comment 1 abolgar 2005-09-16 16:15:20 UTC

*** This bug has been marked as a duplicate of 316487 ***