Skip to content

Better handling of basic xml entity codes

Compare
Choose a tag to compare
@nashwaan nashwaan released this 19 Aug 19:52
· 75 commits to master since this release

This release addresses some issues on escaping entity codes (e.g &) in xml document.

The new implementation can cause a slight breaking change:

  • Converting from xml to js will decode the 5 entity codes &amp; &lt; &gt; &quot; &#39; into & < > " '. For example, &amp; WILL be changed to & character (instead of keeping it &amp;). Also, {sanitize: true} option is deprecated.
  • Converting from js to xml will cause 3 characters & < > (instead of 5 characters) if found in node text to be transformed into &amp; &lt; &gt;. And will cause 1 character " (instead of 5 characters) if found in node attribute to be transformed into &quot;.

For more discussion, see this issue.