BF [2868898] - Exported xml element must be CDATA

https://sourceforge.net/tracker/?func=detail&aid=2868898&group_id=176962&atid=879332
This commit is contained in:
trifonnt 2009-09-29 14:53:24 +00:00
parent 0661da10cb
commit 79d39984ca
1 changed files with 5 additions and 1 deletions

View File

@ -228,7 +228,11 @@ public class Translation
if (valueString == null)
valueString = "";
value.setAttribute(XML_VALUE_ATTRIBUTE_ORIGINAL, origString);
value.appendChild(document.createCDATASection(valueString));
if (valueString.indexOf("<") != -1 || valueString.indexOf(">") != -1 || valueString.indexOf("&") != -1) {
value.appendChild(document.createCDATASection(valueString));
} else {
value.appendChild(document.createTextNode(valueString));
}
row.appendChild(value);
}
root.appendChild(row);