plotters / iksemel

Automatically exported from code.google.com/p/iksemel
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Dont parse xml special characters in attribute #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We have problem that special xlm characters (i.e > < &) are not parsed
correctly when read as attribute. When data is sent as CDATA it works fine.
So when reading (iks_load) and writing (iks_save) the same xml file the
data is corrupted since the iks_load handle the & correct.

What steps will reproduce the problem?
1. Create an XML file with data
foo attribe bar="M&M" CDATA=N&N  frotz CDATA=1
<test><foo bar="M&amp;M">N&amp;N</foo><frotz>1</frotz></test>
2. Read the file an only change data in frotz from 1 to 2
3. The result will be
<test><foo bar="M&amp;amp;M">N&amp;N</foo><frotz>2</frotz></test>

What is the expected output? What do you see instead?
The expected output would be
<test><foo bar="M&amp;M">N&amp;N</foo><frotz>2</frotz></test>

What version of the product are you using? On what operating system?
1.2 on Linux (See no changes in 1.3)

Original issue reported on code.google.com by iciv...@gmail.com on 15 Oct 2008 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by meduke...@gmail.com on 7 Aug 2009 at 8:42

GoogleCodeExporter commented 9 years ago
This is a patch that fixes the issue.  It also includes a new test case in 
test-sax.

Original comment by timothy....@gmail.com on 22 Aug 2009 at 5:57

Attachments: