mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat: add option to disable rendering of html in sql lab and table chart (#27969)
Co-authored-by: Sonia <sonia.gautam@agoda.com>
This commit is contained in:
@@ -237,6 +237,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
sticky = true, // whether to use sticky header
|
||||
columnColorFormatters,
|
||||
allowRearrangeColumns = false,
|
||||
allowRenderHtml = true,
|
||||
onContextMenu,
|
||||
emitCrossFilters,
|
||||
} = props;
|
||||
@@ -469,7 +470,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
accessor: ((datum: D) => datum[key]) as never,
|
||||
Cell: ({ value, row }: { value: DataRecordValue; row: Row<D> }) => {
|
||||
const [isHtml, text] = formatColumnValue(column, value);
|
||||
const html = isHtml ? { __html: text } : undefined;
|
||||
const html = isHtml && allowRenderHtml ? { __html: text } : undefined;
|
||||
|
||||
let backgroundColor;
|
||||
if (hasColumnColorFormatters) {
|
||||
|
||||
Reference in New Issue
Block a user