Closed jtbairdsr closed 5 years ago
have you find solution?
I have not... I am currently rethinking my usage of non breaking spaces.
I search alot on Google..but couldn't found a solution for that..finally switched to https://www.npmjs.com/package/jsontoxml This package works perfectly
js2xmlparser isn't expecting raw XML in strings -- it assumes you want it preserved as text.
If you want a non-breaking space, just use a Unicode literal instead: "\u00A0"
.
if I try to add a non breaking space literal
to the value of an element, the ampersand gets encoded to&
which breaks the non breaking space (perhaps a bit ironic...) is there a way for me to prevent the encoding of the ampersand or do I just need to rethink my usage of non breaking spaces?