From 3578d6e624fc899cc20e5a40ed817f4aec73ac01 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 14 Mar 2013 21:38:38 -0300 Subject: [PATCH] Temporal hack for broken maps in Firefox. \r issue. --- .../main/java/com/wisemapping/rest/MindmapController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 53f08c08..9deb25d2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -179,7 +179,10 @@ public class MindmapController extends BaseController { // I should not return byte, but there is some encoding issue here. Further research needed. response.setCharacterEncoding("UTF-8"); final Mindmap mindmap = mindmapService.findMindmapById(id); - return mindmap.getXmlStr().getBytes("UTF-8"); + + String xmlStr = mindmap.getXmlStr(); + xmlStr = xmlStr.replace('\r',' '); // This is a temporal hack. Remove in 2014 ... :) + return xmlStr.getBytes("UTF-8"); } @RequestMapping(method = RequestMethod.GET, value = { "/maps/{id}/{hid}/document/xml"},consumes = {"text/plain"}, produces = {"application/xml"})