Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private sanitize = () => {
this.result.current.value = HtmlSanitizer.sanitizeHtml(this.source.current.value);
};
}
export default function sanitizeHtml(
html: string,
additionalStyleNodes?: HTMLStyleElement[],
convertInlineCssOnly?: boolean,
propertyCallbacks?: SanitizeHtmlPropertyCallback,
preserveFragmentOnly?: boolean,
currentStyle?: StyleMap
): string {
return HtmlSanitizer.sanitizeHtml(html, {
additionalGlobalStyleNodes: additionalStyleNodes,
convertCssOnly: convertInlineCssOnly,
attributeCallbacks: propertyCallbacks,
currentElementOrStyle: currentStyle,
preserveFragmentOnly,
});
}