diff --git a/src/main/java/com/github/bgalek/security/svg/SvgSecurityValidator.java b/src/main/java/com/github/bgalek/security/svg/SvgSecurityValidator.java index 395aa0f..2e0f2e4 100644 --- a/src/main/java/com/github/bgalek/security/svg/SvgSecurityValidator.java +++ b/src/main/java/com/github/bgalek/security/svg/SvgSecurityValidator.java @@ -50,7 +50,7 @@ private static Set 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();