Hi Peter,
Thank you for the example. Here is a render function I came up with:
var renderer = function (row, dataField, cellValue, cellText, rowData) {
// HTML-encode a string
var encodedValue = $(‘<div/>’).text(cellValue).html();
return $(cellText).text(encodedValue).prop(‘outerHTML’);
}
It works fine, yet I am facing another issue: with the same grid I am allowing users to add or modify rows (using scripts similar to what you have in the examples), and to my surprise, such values already come through as encoded. The custom renderer encodes them again, causing double-encoding.