Skip to content
Snippets Groups Projects
Commit efb22e19 authored by srosse's avatar srosse
Browse files

OO-4602: escape special - from windows

parent e0d702be
No related branches found
No related tags found
No related merge requests found
...@@ -217,7 +217,11 @@ public class PdfDocument { ...@@ -217,7 +217,11 @@ public class PdfDocument {
} }
public static String cleanString(String string) { public static String cleanString(String string) {
return string.replace('\n', ' ').replace('\r', ' ').replace('\t', ' ').replace('\u00A0', ' '); return string.replace('\n', ' ')
.replace('\r', ' ')
.replace('\t', ' ')
.replace('\u00A0', ' ')
.replace('\u2212', '-');
} }
public void drawLine(float xStart, float yStart, float xEnd, float yEnd, float lineWidth) public void drawLine(float xStart, float yStart, float xEnd, float yEnd, float lineWidth)
......
...@@ -48,7 +48,8 @@ public class PdfDocumentTest { ...@@ -48,7 +48,8 @@ public class PdfDocumentTest {
{ "Hello\tworld", "Hello world" }, { "Hello\tworld", "Hello world" },
{ "Hello\n\tworld", "Hello world" }, { "Hello\n\tworld", "Hello world" },
{ "Hello\n\tworld\u00A0", "Hello world " }, { "Hello\n\tworld\u00A0", "Hello world " },
{ "Hello \u3044", "Hello \u3044" } { "Hello \u3044", "Hello \u3044" },
{ "Hello \u2212", "Hello -" }
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment