# xmldom 0.8.12 - Product: xmldom (https://whatsnew.fyi/product/xmldom) - Vendor: xmldom - Date: 2026-03-29 - Version: 0.8.12 - Original notes: https://github.com/xmldom/xmldom/releases/tag/0.8.12 - Permalink: https://whatsnew.fyi/product/xmldom/releases/0.8.12 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **fixed** — Preserve trailing whitespace in ProcessingInstruction data - **security** — createCDATASection now throws InvalidCharacterError when data contains "]]>", as required by the WHATWG DOM spec - **security** — XMLSerializer now splits CDATASection nodes whose data contains "]]>" into adjacent CDATA sections at serialization time, preventing XML injection via mutation methods [Commits](https://github.com/xmldom/xmldom/compare/0.8.11...0.8.12) ###### Fixed - preserve trailing whitespace in ProcessingInstruction data [`#962`](https://github.com/xmldom/xmldom/pull/962) / [`#42`](https://github.com/xmldom/xmldom/issues/42) - Security: `createCDATASection` now throws `InvalidCharacterError` when `data` contains `"]]>"`, as required by the [WHATWG DOM spec](https://dom.spec.whatwg.org/#dom-document-createcdatasection). [`GHSA-wh4c-j3r5-mjhp`](https://github.com/xmldom/xmldom/security/advisories/GHSA-wh4c-j3r5-mjhp) - Security: `XMLSerializer` now splits CDATASection nodes whose data contains `"]]>"` into adjacent CDATA sections at serialization time, preventing XML injection via mutation methods (`appendData`, `replaceData`, `.data =`, `.textContent =`). [`GHSA-wh4c-j3r5-mjhp`](https://github.com/xmldom/xmldom/security/advisories/GHSA-wh4c-j3r5-mjhp) Code that passes a string containing `"]]>"` to `createCDATASection` and relied on the previously unsafe behavior will now receive `InvalidCharacterError`. Use a mutation method such as `appendData` if you intentionally need `"]]>"` in a CDATASection node's data. Thank you, [@thesmartshadow](https://github.com/thesmartshadow), [@stevenobiajulu](https://github.com/stevenobiajulu), for your contributions https://github.com/xmldom/xmldom/discussions/357