seetsy / x2js

Automatically exported from code.google.com/p/x2js
0 stars 0 forks source link

Ampersand character incorrectly encoded in xml #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Convert following xml to json

<element 
href="https://host/api/query?type=field1&amp;page=1&amp;pageSize=25&amp;format=r
eferences" />

And then convert it back to xml. In the resulting xml, ampersand is incorrectly 
encoded:

<element 
href='https://host/api/query?type=field1&page=1&pageSize=25&format=references'/>

Xml Parser reports error:
Unable to parse any XML input. org.jdom2.input.JDOMParseException: Error on 
line 1: The reference to entity "page" must end with the ';' delimiter.

Please check if ampersand and other special characters are xml encoded 
correctly.

What version of the product are you using? On what operating system and
browser version?

I am using the online demo as of now.

Original issue reported on code.google.com by vish.ram...@gmail.com on 26 Dec 2013 at 4:42

GoogleCodeExporter commented 9 years ago
Looks like there is no escaping support for attributes at all. I'll fix it, 
thanks for the report!

Original comment by abdulla....@gmail.com on 28 Dec 2013 at 2:51

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 6a62cf4a278c.

Original comment by abdulla....@gmail.com on 29 Dec 2013 at 2:21

GoogleCodeExporter commented 9 years ago
Hi, 

Do you plan on releasin 1.1.4 with this fix? I've been debugging 1.1.3 to 
finally realised that even if the issue is closed, it isn't commited in the 
latest release...

Original comment by gui.ouel...@gmail.com on 2 Jan 2014 at 7:42

GoogleCodeExporter commented 9 years ago
Hi!
It's closed in 1.1.4 of course. 
It will be available for download as the binary package soon (I think on the 
next week) or you can just grab it now directly from 
https://x2js.googlecode.com/hg/xml2json.min.js

Original comment by abdulla....@gmail.com on 3 Jan 2014 at 1:53

GoogleCodeExporter commented 9 years ago
v1.1.4 is released

Original comment by abdulla....@gmail.com on 3 Jan 2014 at 8:58