1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-22 04:55:10 +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;
}
private String clean(String svg) {
svg = svg.toLowerCase().replaceAll("\\s", "");
if (svg.contains("<script>"))
private String clean(final String svg) {
final String svg2 = svg.toLowerCase().replaceAll("\\s", "");
if (svg2.contains("<script>"))
return EMPTY_SVG;
if (svg.contains("</script>"))
if (svg2.contains("</script>"))
return EMPTY_SVG;
if (svg.contains("<foreignobject"))
if (svg2.contains("<foreignobject"))
return EMPTY_SVG;
if (svg.contains("</foreignobject>"))
if (svg2.contains("</foreignobject>"))
return EMPTY_SVG;
return svg;
}