Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324745 - ']]>' is not correctly escaped in String to-many attributes
Summary: ']]>' is not correctly escaped in String to-many attributes
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: XML/XMI (show other bugs)
Version: 2.5.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 10:13 EDT by Carsten Reckord CLA
Modified: 2010-11-05 05:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Reckord CLA 2010-09-08 10:13:39 EDT
When saving XML, the character sequence ]]> is not correctly escaped when occuring in a String to-many attribute. 

We are stumbling over this when saving java method bodies in UML OpaqueBehavior.body. This fails for method bodies like

writer.println("<![CDATA[stuff]]>");

which is currently encoded as

writer.println(&quot;&lt;![CDATA[stuff]]>&quot;);

(note the unescaped ']]>')

Specifically, I think in XMLSave.saveDataTypeMany(), Escape.escapeText() should be used instead of Escape.escape().
Comment 1 Ed Merks CLA 2010-09-08 12:41:59 EDT
The fix is committed to CVS for 2.7.  I assume it's pretty easy to work around this problem in older releases.
Comment 2 Ed Merks CLA 2010-11-05 05:41:29 EDT
The fix is available in the latest build for the stream.