Error saving files with embedded XML text and CDATA marker

Description

This issue has been reported by the Google team today. The Ocelot version is v3.0-rc7.
They got an error when trying to save some files. I've attached one of those files to the issue.

The Ocelot log reports the following error:
String ']]>' not allowed in textual content, except as the end marker of CDATA section

The attached file contains some xml text embedded in iws tags. In this text '<' and '>' characters are encoded as '&amp;lt;' and '&amp;gt;'
When Okapi reads the file, it changes the '&amp;gt;' to '>'. The issue is generated when the final part of a CDATA marker is found: the string "&amp;lt; ! [ CDATA[....]]&amp;gt;" becomes "&amp;lt; ! [ CDATA[...]]>" and the parser gets an error when Ocelot tries to save this content.

Environment

None

Status

Assignee

Marta Borriello

Reporter

Marta Borriello

Labels

None

Priority

Major
Configure