Hi Bill,
In the pivot table, we have currently sanitized only the cell template elements. However, you can use the "sanitize" method in the "load" event to sanitize the values in the data source. Please see the code sample below.
Code Example:
|
import { SanitizeHtmlHelper } from "@syncfusion/ej2-base";
load(args) {
var data = [];
for (var i = 0; i < args.dataSourceSettings.dataSource.length; i++) {
var keys = Object.keys(args.dataSourceSettings.dataSource[i]);
var currentData = {};
for (var j = 0; j < keys.length; j++) {
currentData[keys[j]] = SanitizeHtmlHelper.sanitize(
args.dataSourceSettings.dataSource[i][keys[j]]
);
}
data.push(currentData);
}
args.dataSourceSettings.dataSource = data;
}, |
Meanwhile, we have modified your sample for your reference. Please find it from below link.
Please let us know if you have any concerns.
Regards,
Manikandan