@diplodoc/transform 4.76.5 → 4.76.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -791,6 +791,15 @@ function sanitizeStyleAttrs(dom: cheerio.CheerioAPI, cssWhiteList: CssWhiteList)
791
791
  return;
792
792
  }
793
793
 
794
+ // cssfilter whitelist is HTML-oriented and strips SVG presentation attrs (stroke, etc.)
795
+ if (dom(element).closest('svg').length > 0) {
796
+ if (!isSafeCssValue('style', styleAttrValue)) {
797
+ dom(element).removeAttr('style');
798
+ }
799
+
800
+ return;
801
+ }
802
+
794
803
  dom(element).attr('style', cssSanitizer.process(styleAttrValue));
795
804
  });
796
805
  }