xmldom icon indicating copy to clipboard operation
xmldom copied to clipboard

encode entity "greater-than" (>) in text node

Open lseguin42 opened this issue 8 years ago • 3 comments

On browser : new DOMParser().parseFormString('<div>]]></div>', 'text/xml'); this code throw an error.

we need to encode '>' for fix it.

lseguin42 avatar Feb 19 '17 19:02 lseguin42

Hey @lseguin42 how do you run the tests? npm test just runs a single one.

reebayroo avatar Mar 10 '17 17:03 reebayroo

I just ran node test/index.js. Anyway, this PR is chaotic beacause there are loads of completely unrelated whitespace changes. IMHO, this should be closed in favour of PR #207, which only escapes > if it was preceded by ]] (in accordance with Section 2.4. of the XML 1.0 spec).

Holzhaus avatar May 27 '17 11:05 Holzhaus

Not encoding > to &gt; casues a lot of troubles if the try to format (pretty print) serialised XML text. It would be very helpful to have this pull request merged IMHO

lviggiani avatar Jul 04 '17 16:07 lviggiani