Commit 8d1caa7a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added support for storing CDATA. JM-863

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5625 b35dd754-fafc-0310-a699-88a17e54d16e
parent 88a75a9a
......@@ -313,7 +313,13 @@ public class XMLProperties {
}
// Add the new children.
for (String value : values) {
element.addElement(childName).setText(value);
Element childElement = element.addElement(childName);
if (value.startsWith("<![CDATA[")) {
childElement.addCDATA(value.substring(9, value.length()-3));
}
else {
childElement.setText(value);
}
}
saveProperties();
......@@ -386,7 +392,12 @@ public class XMLProperties {
element = element.element(propName[i]);
}
// Set the value of the property in this node.
element.setText(value);
if (value.startsWith("<![CDATA[")) {
element.addCDATA(value.substring(9, value.length()-3));
}
else {
element.setText(value);
}
// Write the XML properties to disk
saveProperties();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment