[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 simsekandLudovic Viaud authored and Horst Gutmann committed 2023-03-22 17:41:54 +01:00
1 parent b1c73a9984
commit ca91072d5b
1 file changed
+1 -3
@@ -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>;
},
};
});