Try to fix issues with encoding.

This commit is contained in:
Paulo Gustavo Veiga 2012-11-28 21:44:17 -03:00
parent 66e4b0fb19
commit ebd6f886d5
2 changed files with 5 additions and 5 deletions

View File

@ -177,7 +177,10 @@ public class Mindmap {
throws IOException { throws IOException {
String xml = this.getXmlStr(); String xml = this.getXmlStr();
if (xml != null) { if (xml != null) {
xml = StringEscapeUtils.escapeJavaScript(xml); xml = xml.replace("'", "\\'");
xml = xml.replace("\n", "\\n");
xml = xml.replace("\r", "");
xml = xml.trim();
} }
return xml; return xml;
} }

View File

@ -125,10 +125,7 @@ public class MindMapBean {
} }
public String getXmlAsJsLiteral() throws IOException { public String getXmlAsJsLiteral() throws IOException {
final String result = this.mindmap.getXmlAsJsLiteral(); return this.mindmap.getXmlAsJsLiteral();
// Firefox is failing for this. Need to be reviewed ...
return result.replace("\\u0000", "");
} }
public String getProperties() throws WiseMappingException { public String getProperties() throws WiseMappingException {