Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
2.0 RC2
-
None
-
patch
-
Trivial
-
Description
I believe that the document contents should be put in a CDATA section, as it may contain xml-markup. Otherwise it is problematic to manage the documents with external tools. At least the XML::DOM library for Perl mess up the contents.
Here is a patch:
Index: xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
===================================================================
--- xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java (revision 21701)
+++ xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java (arbetskopia)
@@ -2604,7 +2604,7 @@
// String newcontent = filter.process(getContent());
// String newcontent = encodedXMLStringAsUTF8(getContent());
String newcontent = this.content;
- el.addText(newcontent);
+ el.addCDATA(newcontent);
docel.add(el);
if (bWithRendering) {