1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-25 22:37:33 +00:00
This commit is contained in:
Arnaud Roques 2022-04-07 19:07:38 +02:00
parent d8c80f4110
commit c9137be051

View File

@ -52,15 +52,15 @@ public class UImageSvg implements UShape {
this.scale = scale; this.scale = scale;
} }
private String clean(String svg) { private String clean(final String svg) {
svg = svg.toLowerCase().replaceAll("\\s", ""); final String svg2 = svg.toLowerCase().replaceAll("\\s", "");
if (svg.contains("<script>")) if (svg2.contains("<script>"))
return EMPTY_SVG; return EMPTY_SVG;
if (svg.contains("</script>")) if (svg2.contains("</script>"))
return EMPTY_SVG; return EMPTY_SVG;
if (svg.contains("<foreignobject")) if (svg2.contains("<foreignobject"))
return EMPTY_SVG; return EMPTY_SVG;
if (svg.contains("</foreignobject>")) if (svg2.contains("</foreignobject>"))
return EMPTY_SVG; return EMPTY_SVG;
return svg; return svg;
} }