← Back to release summary

XML documents merge consecutive CDATA sections into single node

Category
DOM
Type
No developer-visible change
Status
Enabled by default (Chrome 118)
Intent stage
None

Summary

This change causes sibling CDATA section nodes in an XML document to be merged into a single CDATA node. This is to mitigate a bug in libxml: when a single CDATA section spans multiple input parser chunks, libxml buffers and emits the CDATA input into 300 byte runs. This unexpectedly causes a single CDATA section to be outputted into multiple DOM nodes (if the length of the input chunk is > 300 bytes). This change updates the parser to always merge adjacent CDATA nodes. This addresses the libxml bug but will also affect explicitly authored CDATA sections in the same way. For example: `<![CDATA[foo]]><!CDATA[bar]]>` will result in a single CDATA DOM node with content "foobar". For more details, see https://crrev.com/f848cbce89b422 .

Standards & signals

View on chromestatus.com