XML Marshaler needs to properly handle "]]>" in strings
Status: Beta
Brought to you by:
bkoehn
To preserve formatting, the marshaler encodes data in a
CDATA block. If the block contains the CDATA end tag
"]]>", the data should be encoded thusly:
Source data: Hello]]>World
Marshaled data: <![CDATA[Hello]]>]]<<![CDATA[World]]>
Simply split the source text on "]]>", and encode each
chunk in a CDATA, separated by a text node containing
"]]>". Need to see if this is what dom4j does on the
Java side.
Logged In: YES
user_id=434073
Fixed. Added necessary splitting code in both Java and
Javascript marshalers. Test splits at the beginning, middle,
end, and sole positions in Strings.
Logged In: YES
user_id=434073
Code correctly handles a single CDATA terminator in the
source text, but needs to also handle multiple terminators
in sequence.