jindw / xmldom

A PURE JS W3C Standard based(XML DOM Level2 CORE) DOMParser and XMLSerializer.
Other
819 stars 265 forks source link

Parses XML with `&` in text node #181

Closed codan84 closed 8 years ago

codan84 commented 8 years ago
var dom = require('xmldom').DOMParser;
const invalidXml = `<?xml version="1.0" encoding="UTF-8"?><Cell>& " ' &lt; &gt;</Cell>`;
const parsed = new dom().parseFromString(invalidXml);
console.log(parsed);

Doesn't return an error. The & there is invalid, should be &amp;.

jindw commented 8 years ago

yes,it's not a bug We added some fault tolerant processing .