diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx index ce4b6cf48bf..b38635faa6d 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx @@ -30,10 +30,12 @@ import { debounceFunc } from '../../consts'; interface StyleCustomControlProps { value: string; + htmlSanitization: boolean; } const StyleControl = (props: CustomControlConfig) => { const theme = useTheme(); + const htmlSanitization = props.htmlSanitization ?? true; const defaultValue = props?.value ? undefined @@ -48,10 +50,16 @@ const StyleControl = (props: CustomControlConfig) => {
{props.label} - + {htmlSanitization && ( + + )}
({ + mapStateToProps: ({ controls, common }) => ({ value: controls?.handlebars_template?.value, + htmlSanitization: common?.conf?.HTML_SANITIZATION ?? true, }), }, };