diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java index 6124327f..5941317b 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -45,6 +45,7 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.io.*; +import java.util.regex.Pattern; public class ExporterFactory { private static final String GROUP_NODE_NAME = "g"; @@ -147,6 +148,9 @@ public class ExporterFactory { svgXml = svgXml.replaceAll("NaN,", "0"); svgXml = svgXml.replaceAll(",NaN", "0"); + // Bratik do not manage nbsp properly. + svgXml = svgXml.replaceAll(Pattern.quote(" ")," "); + Document document; try { final Reader in = new CharArrayReader(svgXml.toCharArray()); diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java index 4de93627..bc9171f0 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java @@ -59,14 +59,8 @@ public class TransformView extends AbstractView { // Build format properties ... final ExportProperties properties = ExportProperties.create(exportFormat); if (properties instanceof ExportProperties.ImageProperties) { - final String sizeStr = request.getParameter(IMG_SIZE_PARAMETER); final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties; - if (sizeStr != null) { - final ExportProperties.ImageProperties.Size size = ExportProperties.ImageProperties.Size.valueOf(sizeStr); - imageProperties.setSize(size); - } else { - imageProperties.setSize(ExportProperties.ImageProperties.Size.MEDIUM); - } + imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE); } // Set format content type... @@ -103,6 +97,4 @@ public class TransformView extends AbstractView { public String getContentType() { return contentType; } - - private static final String IMG_SIZE_PARAMETER = "imgSize"; } diff --git a/wise-webapp/src/test/resources/data/freemind/note.mm b/wise-webapp/src/test/resources/data/freemind/note.mm index a304255d..eb9597e8 100644 --- a/wise-webapp/src/test/resources/data/freemind/note.mm +++ b/wise-webapp/src/test/resources/data/freemind/note.mm @@ -21,8 +21,7 @@ This is bold

- - + @@ -33,8 +32,7 @@ This is a simple note

- -
+
diff --git a/wise-webapp/src/test/resources/data/svg/bug-nbsp.png b/wise-webapp/src/test/resources/data/svg/bug-nbsp.png new file mode 100644 index 00000000..885f2ea5 Binary files /dev/null and b/wise-webapp/src/test/resources/data/svg/bug-nbsp.png differ diff --git a/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg b/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg new file mode 100644 index 00000000..13df10ec --- /dev/null +++ b/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg @@ -0,0 +1,2251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Insomnia + + + + + + + + NUTRITION/HEALTH + + + + + + + + + NUTRITION + + + + + + + + + Resist energy drinks  + + + + + + + + + Take calcium, zinc and magnesium vitamins  + + + + + + + + + Drink relaxing tea  + + + + + + + + + Drink plenty of water  + + + + + + + + + Eat food that promotes sleep  + + + + + + + + + HEALTH + + + + + + + + + Get sunlight  + + + + + + + + + Consult doctor  + + + + + + + + + Check your thyroid  + + + + + + + + + Avoid medicine that keeps you awake/alert + + + + + + + + + Address health issues  + + + + + + + + + PHYSICAL + + + + + + + + + Meditate  + + + + + + + + + Practice relaxation techniques  + + + + + + + + + Maintain your ideal weight  + + + + + + + + + Get massaged  + + + + + + + + + Exercise  + + + + + + + + + Spend time outside  + + + + + + + + + Practice yoga  + + + + + + + + + Enjoy activities during the day  + + + + + + + + + Aroma therapy  + + + + + + + + + SLEEP PATTERN/POSITION + + + + + + + + + BREATING + + + + + + + + + Slow down breathing  + + + + + + + + + Do breathing exercises  + + + + + + + + + SLEEP PATTERN + + + + + + + + + Wake up same time each day  + + + + + + + + + Create bedtime ritual  + + + + + + + + + Understand your sleep cycle  + + + + + + + + + Tell your companions when they can wake you  + + + + + + + + + Go to bed the same time every day  + + + + + + + + + POSITIONING + + + + + + + + + Support body  + + + + + + + + + Sleep in your bedroom and your bed + + + + + + + + + Pillow under knees  + + + + + + + + + Change your position  + + + + + + + + + Visit sleep clinic for problems  + + + + + + + + + Children in their own bed  + + + + + + + + + TO DO IN BED + + + + + + + + + RELAXATION + + + + + + + + + Repeat a mantra word  + + + + + + + + + Recite favorite poems to yourself  + + + + + + + + + Say your prayers  + + + + + + + + + Read a thought or quote of the day  + + + + + + + + + REFLEXOLOGY + + + + + + + + + Wiggle your toes  + + + + + + + + + SLEEPING ACTIONS + + + + + + + + + Count backwards  + + + + + + + + + Masks to cover eyes  + + + + + + + + + Use ear plugs  + + + + + + + + + Read a page of a day book  + + + + + + + + + Count sheep  + + + + + + + + + OPTIMISM/BEHAVIOR + + + + + + + + + PROBLEMS + + + + + + + + + Maintain safe environment  + + + + + + + + + Acknowledge what is bothering you and let it go  + + + + + + + + + Resolve disagreements  + + + + + + + + + BEHAVIOR + + + + + + + + + If you can’t sleep, get up, do something until tired + + + + + + + + + Fight after dinner drowsiness + + + + + + + + + Wear comfortable sleeping clothes  + + + + + + + + + Keep a sleep journal  + + + + + + + + + Do some good for others  + + + + + + + + + Behave well  + + + + + + + + + OPTIMISIM + + + + + + + + + Keep a gratefulness diary/journal  + + + + + + + + + Know you have the power to solve your problems  + + + + + + + + + Think positively – you are going to have a good night’s sleep  + + + + + + + + + Imagine something happy  + + + + + + + + + Think positively and be happy + + + + + + + + + BEDROOM + + + + + + + + + Make bedroom sleep sanctuary  + + + + + + + + + Reserve bed and bedroom for sleep, love and reading  + + + + + + + + + ENVIRONMENT + + + + + + + + + Comfortable humidity  + + + + + + + + + Let sunshine in  + + + + + + + + + RELAXATION + + + + + + + + + Listen to a relaxation CD that shuts off by itself  + + + + + + + + + Eucalyptus twigs in a bed stand vase + + + + + + + + + Scented candles  + + + + + + + + + Keep bedroom neat without clutter  + + + + + + + + + BED + + + + + + + + + Clean bedding  + + + + + + + + + Bedding colors and textures should be soothing and peaceful  + + + + + + + + + INTERIOR DESIGN + + + + + + + + + Peaceful, calm décor  + + + + + + + + + Have an aquarium with fish  + + + + + + + + + Select peaceful wall hangings  + + + + + + + + + Arrange furniture to block light  + + + + + + + + + Cool and dark + + + + + + + + + Have plants  + + + + + + + + + Room darkening shades  + + + + + + + + + Walls painted in restful colors  + + + + + + + + + No technology in room (television, computer)  + + + + + + + + + Low watt bulbs  + + + + + + + + + White noise machine  + + + + + + + + + NEAR BED + + + + + + + + + Water on bed stand  + + + + + + + + + Place clock out of arm’s reach  + + + + + + + + + Comfort items organized neatly near bed  + + + + + + + + + BEFORE GOING TO BED  + + + + + + + + + FOOD AND DRINKS + + + + + + + + + Drink a glass of warm milk  + + + + + + + + + Have rosebud tea  + + + + + + + + + Eat foods with tryptophan  + + + + + + + + + DE-STRESSING + + + + + + + + + Write problems on paper and leave them there  + + + + + + + + + Avoid emotional discussions  + + + + + + + + + Stop watching television an hour before bedtime  + + + + + + + + + RELAXATION + + + + + + + + + Turn off your mobile phone  + + + + + + + + + Massage or cuddle with your loved one  + + + + + + + + + Take a warm bath or shower  + + + + + + + + + Have sex  + + + + + + + + + Brush and floss your teeth  + + + + + + + + + Use the bathroom  + + + + + + + + + Take a sleep aid suggested by doctor + + + + + + + + + Use a flashlight to use the bathroom  + + + + + + + + + DON'T + + + + + + + + + Smoke  + + + + + + + + + Alcohol  + + + + + + + + + Nap too much  + + + + + + + + + Be angry  + + + + + + + + + Watch/read news before bed  + + + + + + + + + Eat a lot before bed  + + + + + + + + + Sleep on the couch + + + + + + + + + No pets  + + + + + + + + + Avoid eating  + + + + + + + + + Avoid upsetting activities like bill paying  + + + + + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/svg/bug1.png b/wise-webapp/src/test/resources/data/svg/bug1.png index f72b227e..94de3e50 100644 Binary files a/wise-webapp/src/test/resources/data/svg/bug1.png and b/wise-webapp/src/test/resources/data/svg/bug1.png differ diff --git a/wise-webapp/src/test/resources/data/svg/map-3.0.png b/wise-webapp/src/test/resources/data/svg/map-3.0.png index 09b61de6..24f5858a 100644 Binary files a/wise-webapp/src/test/resources/data/svg/map-3.0.png and b/wise-webapp/src/test/resources/data/svg/map-3.0.png differ diff --git a/wise-webapp/src/test/resources/data/svg/map1.png b/wise-webapp/src/test/resources/data/svg/map1.png index df72c2ac..6f62ff77 100644 Binary files a/wise-webapp/src/test/resources/data/svg/map1.png and b/wise-webapp/src/test/resources/data/svg/map1.png differ diff --git a/wise-webapp/src/test/resources/data/svg/map2.png b/wise-webapp/src/test/resources/data/svg/map2.png index f79298d8..e7ab7550 100644 Binary files a/wise-webapp/src/test/resources/data/svg/map2.png and b/wise-webapp/src/test/resources/data/svg/map2.png differ diff --git a/wise-webapp/src/test/resources/data/svg/map3.png b/wise-webapp/src/test/resources/data/svg/map3.png index ec75efe7..d5d98d2a 100644 Binary files a/wise-webapp/src/test/resources/data/svg/map3.png and b/wise-webapp/src/test/resources/data/svg/map3.png differ diff --git a/wise-webapp/src/test/resources/data/svg/map4.png b/wise-webapp/src/test/resources/data/svg/map4.png index e5776d88..c38a5bae 100644 Binary files a/wise-webapp/src/test/resources/data/svg/map4.png and b/wise-webapp/src/test/resources/data/svg/map4.png differ diff --git a/wise-webapp/src/test/resources/data/svg/map6.png b/wise-webapp/src/test/resources/data/svg/map6.png index 34a5dd0f..f5d1a434 100644 Binary files a/wise-webapp/src/test/resources/data/svg/map6.png and b/wise-webapp/src/test/resources/data/svg/map6.png differ