Skip to content

Escape CDATA closing sequences during serialization#238

Open
bcomnes wants to merge 2 commits into
oozcitak:masterfrom
bcomnes:bret/fix-cdata-terminator
Open

Escape CDATA closing sequences during serialization#238
bcomnes wants to merge 2 commits into
oozcitak:masterfrom
bcomnes:bret/fix-cdata-terminator

Conversation

@bcomnes

@bcomnes bcomnes commented Jul 11, 2026

Copy link
Copy Markdown

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Fixes #230

Allow CDATA content containing ]]> to be serialized instead of throwing InvalidCharacterError.

The forbidden closing sequence is split across adjacent CDATA sections while preserving the original combined text content.

This works with the standard builder, callback builder, object conversion, well-formed output, and pretty-printing without introducing additional whitespace.

Fixes #230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ]]> escaping in dat method

1 participant