Fix firefox issue with \b caracters.

This commit is contained in:
Paulo Gustavo Veiga 2013-01-31 20:01:15 -03:00
parent 7a401b648e
commit 43e9f8fcad

View File

@ -173,6 +173,7 @@ public class Mindmap {
this.title = title;
}
@NotNull
public String getXmlAsJsLiteral()
throws IOException {
String xml = this.getXmlStr();
@ -180,6 +181,13 @@ public class Mindmap {
xml = xml.replace("'", "\\'");
xml = xml.replace("\n", "\\n");
xml = xml.replace("\r", "");
xml = xml.replace("\\b", "\\\\b");
xml = xml.replace("\\t", "\\\\t");
xml = xml.replace("\\r", "\\\\r");
xml = xml.replace("\\n", "\\\\n");
xml = xml.trim();
}
return xml;