Escaping null character in received strings. This characters hack the xml library and the CDATA section.

cusax-fix
Damian Minkov 20 years ago
parent 828b9cbaaa
commit 2c3e5f8715

@ -105,7 +105,7 @@ private void addRecord(String[] propertyNames, String[] propertyValues,
.createElement(propertyName);
Text value = this.currentDoc
.createCDATASection(propertyValues[i]);
.createCDATASection(propertyValues[i].replaceAll("\0", " "));
propertyElement.appendChild(value);
elem.appendChild(propertyElement);
@ -119,7 +119,7 @@ private void addRecord(String[] propertyNames, String[] propertyValues,
.createElement(propertyName);
Text value = this.currentDoc
.createTextNode(propertyValues[i]);
.createTextNode(propertyValues[i].replaceAll("\0", " "));
propertyElement.appendChild(value);
elem.appendChild(propertyElement);

Loading…
Cancel
Save