diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index bdf6e373..13f50262 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -177,7 +177,10 @@ public class Mindmap { throws IOException { String xml = this.getXmlStr(); if (xml != null) { - xml = StringEscapeUtils.escapeJavaScript(xml); + xml = xml.replace("'", "\\'"); + xml = xml.replace("\n", "\\n"); + xml = xml.replace("\r", ""); + xml = xml.trim(); } return xml; } diff --git a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java index 751f56e2..d568a657 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java @@ -125,10 +125,7 @@ public class MindMapBean { } public String getXmlAsJsLiteral() throws IOException { - final String result = this.mindmap.getXmlAsJsLiteral(); - - // Firefox is failing for this. Need to be reviewed ... - return result.replace("\\u0000", ""); + return this.mindmap.getXmlAsJsLiteral(); } public String getProperties() throws WiseMappingException {