Fixing the escaping for settings datatable

This time, fixing the right spot.

Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
This commit is contained in:
rdwebdesign
2022-01-31 17:49:58 -03:00
parent bf82c47e98
commit c2b902da3b

View File

@@ -238,9 +238,23 @@ $(function () {
columnDefs: [
{ bSortable: false, orderable: false, targets: -1 },
{
targets: [0, 1, 2],
targets: [0, 1],
render: $.fn.dataTable.render.text(),
},
{
targets: 2,
render: function (data) {
// Show "unknown", when host is "*"
var str;
if (data === "*") {
str = "<i>unknown</i>";
} else {
str = typeof data === "string" ? utils.escapeHtml(data) : data;
}
return str;
},
},
],
paging: true,
order: [[2, "asc"]],
@@ -268,23 +282,9 @@ $(function () {
columnDefs: [
{ bSortable: false, orderable: false, targets: -1 },
{
targets: [0, 1],
targets: [0, 1, 2],
render: $.fn.dataTable.render.text(),
},
{
targets: 2,
render: function (data) {
// Show "unknown", when host is "*"
var str;
if (data === "*") {
str = "<i>unknown</i>";
} else {
str = typeof data === "string" ? utils.escapeHtml(data) : data;
}
return str;
},
},
],
paging: true,
order: [[2, "asc"]],