Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape "&" caractere #37

Closed
GoogleCodeExporter opened this issue Nov 9, 2015 · 1 comment
Closed

escape "&" caractere #37

GoogleCodeExporter opened this issue Nov 9, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. xml = "<out><test>foo & bar</test></out>";
2. json = x2js.xml_str2json(xml);

What is the expected output? 
json = {"out":{"test":"foo & bar"}}

What do you see instead?
json = null

What version of the product are you using? On what operating system and
browser version?
I'm on Firefox and It doesn't work on https://x2js.googlecode.com/hg/demo.html
I think this is the lastest version ...

Is there a fix or something to do ?
I can't modify xml that comes from the server.

Modifications have to be done on the xml or the plugin ?

Thanks in advance!




Original issue reported on code.google.com by Benc...@gmail.com on 2 Mar 2015 at 12:37

@GoogleCodeExporter
Copy link
Author

try this
"xml = "<out><test>foo & bar</test></out>".
You can't use an unescaped "&" in well-formed XML and it won't be accepted by 
XML parsers in browsers as a valid document.

Original comment by abdulla....@gmail.com on 20 May 2015 at 9:57

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant