diff --git a/packages/yasr/src/plugins/table/index.ts b/packages/yasr/src/plugins/table/index.ts index 3d5f6307..48ff1c26 100644 --- a/packages/yasr/src/plugins/table/index.ts +++ b/packages/yasr/src/plugins/table/index.ts @@ -14,6 +14,7 @@ import { drawSvgStringAsElement, drawFontAwesomeIconAsSvg, addClass, removeClass import * as faTableIcon from "@fortawesome/free-solid-svg-icons/faTable"; import { DeepReadonly } from "ts-essentials"; import { cloneDeep } from "lodash-es"; +import sanitize from "../../helpers/sanitize"; const ColumnResizer = require("column-resizer"); const DEFAULT_PAGE_SIZE = 50; @@ -162,8 +163,8 @@ export default class Table implements Plugin { }, //prepend with row numbers column ...this.yasr.results?.getVariables().map((name) => { return { - name: name, - title: name, + name, + title: sanitize(name), render: (data: Parser.BindingValue | "", type: any, _row: any, _meta: DataTables.CellMetaSettings) => { // Handle empty rows if (data === "") return data;