Advisory

GHSA-wh4c-j3r5-mjhp

Details, part 2 of 2. The advisory

Details

Migration
Replace any reliance on the default split behavior with an explicit opt-in:


// After (explicit guard, spec-aligned): const xml = new XMLSerializer().serializeToString(doc, { requireWellFormed: true }); // Throws InvalidStateError if any CDATASection contains ']]>' ```

### Removal timeline
Both the `splitCDATASections` option and the underlying `]]>` → `]]]]><![CDATA[>` split mechanics will be removed in the next breaking (`0.10.0`) release. After removal, the only behaviors will be verbatim (default) and `requireWellFormed: true` (throws).

Removal is tracked in [xmldom/xmldom#999](https://github.com/xmldom/xmldom/issues/999).

Sources & licences