You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/04/03 21:59:01 UTC
DO NOT REPLY [Bug 7731] New: -
Serialization of CDATA sections is incorrect when CDATA terminator is split across CDATA sections
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7731>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7731
Serialization of CDATA sections is incorrect when CDATA terminator is split across CDATA sections
Summary: Serialization of CDATA sections is incorrect when
CDATA terminator is split across CDATA sections
Product: Xerces-J
Version: 1.4.4
Platform: Other
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: mschilling@edgility.com
Parse the following document into a DOM tree, and use
org.apache.xml.serialize.XMLSerializer to serialize it.
Document:
<?xml version="1.0" encoding="UTF-8"?>
<top><![CDATA[]]]]><![CDATA[>]]>
</top>
Result:
<?xml version="1.0" encoding="UTF-8"?>
<top><![CDATA[]]>]]>
</top>
In the second line of the result:
<![CDATA[ is the CDATA header
]] is the content of the first CDATA section
> is the content of the second CDATA section
]]> is the CDATA terminator
The problem is XMLSerializer concatentating CDATA sections without checking if
that produces "]]>".
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org