Skip to content

Commit b5e4c36

Browse files
committed
don't escape xml
1 parent 9ca5467 commit b5e4c36

File tree

1 file changed

+0
-19
lines changed
  • graphviz-java/src/main/java/guru/nidi/graphviz/engine

1 file changed

+0
-19
lines changed

graphviz-java/src/main/java/guru/nidi/graphviz/engine/Format.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,20 @@
2323

2424
public enum Format {
2525
PNG("svg", "png", true, true) {
26-
@Override
27-
String preProcess(String src) {
28-
return encodeXml(super.preProcess(src));
29-
}
30-
3126
@Override
3227
EngineResult postProcess(Graphviz graphviz, EngineResult result) {
3328
return result.mapString(s -> postProcessSvg(graphviz.processOptions, s, true));
3429
}
3530
},
3631

3732
SVG("svg", "svg", false, true) {
38-
@Override
39-
String preProcess(String src) {
40-
return encodeXml(super.preProcess(src));
41-
}
42-
4333
@Override
4434
EngineResult postProcess(Graphviz graphviz, EngineResult result) {
4535
return result.mapString(s -> postProcessSvg(graphviz.processOptions, s, true));
4636
}
4737
},
4838

4939
SVG_STANDALONE("svg", "svg", false, true) {
50-
@Override
51-
String preProcess(String src) {
52-
return encodeXml(super.preProcess(src));
53-
}
54-
5540
@Override
5641
EngineResult postProcess(Graphviz graphviz, EngineResult result) {
5742
return result.mapString(s -> postProcessSvg(graphviz.processOptions, s, false));
@@ -108,10 +93,6 @@ private static String replaceSubSpaces(String src) {
10893
return new String(chars);
10994
}
11095

111-
private static String encodeXml(String src) {
112-
return src.replace("&", "&");
113-
}
114-
11596
private static String postProcessSvg(ProcessOptions options, String result, boolean prefix) {
11697
final String unprefixed = prefix ? withoutPrefix(result) : result;
11798
return pointsToPixels(unprefixed, options.dpi, options.width, options.height, options.scale);

0 commit comments

Comments
 (0)