From 5719e540912c180d471665ce2f943ba55ee3e6ac Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 14 Sep 2012 10:55:59 -0300 Subject: [PATCH] Hack for wron encoding on UTF chars. --- .../src/main/java/com/wisemapping/view/MindMapBean.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 adf14ea1..49a32df0 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java @@ -27,6 +27,7 @@ import org.jetbrains.annotations.Nullable; import java.io.IOException; import java.text.DateFormat; import java.util.*; +import java.util.regex.Pattern; public class MindMapBean { private Mindmap mindmap; @@ -123,7 +124,10 @@ public class MindMapBean { } public String getXmlAsJsLiteral() throws IOException { - return this.mindmap.getXmlAsJsLiteral(); + final String xmlAsJsLiteral = this.mindmap.getXmlAsJsLiteral(); + + // Firefox is failing for this. Need to be reviewed ... + return xmlAsJsLiteral.replace(Pattern.quote("\\u0000"),""); } public String getProperties() throws WiseMappingException {