Skip to content

Serializing CDATA with "]]>" Can Create Invalid XML #40

Closed
djspiewak opened this Issue Aug 16, 2011 · 0 comments

1 participant

@djspiewak
Owner

Consider the following:

CDATA("]]>").toString

This will produce:

<![CDATA[]]>]]>

Naturally, this isn't going to fly. We should be checking for the magic control sequence in the constructor for CDATA and raising an exception if found:

CDATA("]]>") must throwAn[IllegalArgumentException]

Find due to @bartschuller.

@djspiewak djspiewak closed this Aug 17, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.