Hi all,
currently AjaxRequestHandler escapes CDATA as follows:
Strings.replaceAll(str, "]", "]^")
decode() in wicket-ajax-jquery.js does the inverse on processing of the
ajax response:
replaceAll(text, "]^", "]")
But the recommended approach to handle nested CDATA sections is to split
each "]]>" with an additional CDATA end/start:
Strings.replaceAll(str, "]]>", "]]" + "]]><![CDATA[" + ">");
Does anybody know why we don't do it this way?
The nice thing about the latter solution is that wicket-ajax-jquery.js
doesn't have to know anything about escaping, because the XML parser
will automatically take care of it.
Thanks
Sven