node-json2xml icon indicating copy to clipboard operation
node-json2xml copied to clipboard

'&' not escaped in attribute

Open yzhou88 opened this issue 6 years ago • 0 comments

Test code:

var json2xml = require("json2xml")
json2xml({ a: 1, attr: { b: 'a&b' } }, { attributes_key: 'attr' });

Result: <a b=\"a&b\">1</a>

Where a&b should be: a&b

yzhou88 avatar Jun 11 '18 02:06 yzhou88