[v9.4.x] Fix xss in Graphite functions tooltip (#805)

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:48:28 -05:00
committed by Kevin Minehart
co-authored by Ludovic Viaud
parent bb6607daaf
commit ef2eb2b6bf
@@ -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>;
},
};
});