|
From: Andreas V. <a_...@us...> - 2004-04-14 18:47:33
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/item In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5921/src/org/cobricks/item Modified Files: Item.java Log Message: Index: Item.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/item/Item.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Item.java 14 Apr 2004 11:54:30 -0000 1.17 +++ Item.java 14 Apr 2004 18:47:24 -0000 1.18 @@ -590,9 +590,11 @@ // A String can contain any text; therefore it is possible that // the String is not wellformed. So we have to wrap text that is // not wellformed in a CDATA statement - if (!((String) value).matches("(?s)<![CDATA[.+]]>") + if (!((String) value).matches("(?s)<![CDATA[.*]]>") && (ItemAttrs.checkWellFormedXML("<test>" + (String) value + "</test>").length()) > 0) { + + value = ((String) value).replaceAll("\\]\\]>", "]]>"); value = "<![CDATA[" + value + "]]>"; } xml.append(">" + value + "</" + attribute + ">\n"); |