Skip to content

Commit

Permalink
fixed inline style default whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
bgalek committed Nov 20, 2020
1 parent e27b4d3 commit dfd6f6e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static Set<String> getOffendingElements(String xml) {
if (JAVASCRIPT_PROTOCOL_IN_CSS_URL.matcher(xml).find()) return Collections.singleton("style");
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements(SVG_ELEMENTS)
.allowStyling(CssSchema.withProperties(SVG_SPECIFIC_STYLES))
.allowStyling(CssSchema.union(CssSchema.DEFAULT, CssSchema.withProperties(SVG_SPECIFIC_STYLES)))
.allowAttributes(SVG_ATTRIBUTES).globally()
.allowUrlProtocols("https")
.toFactory();
Expand Down

0 comments on commit dfd6f6e

Please sign in to comment.