Revert "Fix xss in Graphite functions tooltip (#64925)" (#64933)

This reverts commit a896feb346.
This commit is contained in:
Ludovic Viaud
2023-03-16 21:37:48 +01:00
committed by GitHub
parent a896feb346
commit e22e12455d
4 changed files with 280 additions and 7 deletions

View File

@@ -11,9 +11,11 @@ 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>{props.description}</div>;
return <div dangerouslySetInnerHTML={{ __html: rst2html(props.description ?? '') }} />;
},
};
});