[v9.3.x] Fix xss in Graphite functions tooltip (#806)

Fix xss in Graphite functions tooltip (#804)

(cherry picked from commit 87aad3f11836f810ee1fdfee27827e746ef36055)

Co-authored-by: Ludovic Viaud <ludovic.viaud@gmail.com>
This commit is contained in:
ismail simsek
2023-03-16 18:16:52 -05:00
committed by Kevin Minehart
co-authored by Ludovic Viaud
parent 72a13b0fd9
commit 14bc6f98df
@@ -11,11 +11,9 @@ export interface FunctionEditorControlsProps {
}
const FunctionDescription = React.lazy(async () => {
// @ts-ignore
const { default: rst2html } = await import(/* webpackChunkName: "rst2html" */ 'rst2html');
return {
default(props: { description?: string }) {
return <div dangerouslySetInnerHTML={{ __html: rst2html(props.description ?? '') }} />;
return <div>{props.description}</div>;
},
};
});