Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudroques committed Apr 7, 2022
1 parent d8c80f4 commit c9137be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
Expand Up @@ -52,15 +52,15 @@ public UImageSvg(String svg, double scale) {
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;
}
Expand Down

1 comment on commit c9137be

@andrewshadura
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.