mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Fix the wrong escaping on settings datatable (#2100)
* Fix the wrong escaping on settings datatable Signed-off-by: rdwebdesign <github@rdwebdesign.com.br> * Using utils escapeHtml function Signed-off-by: rdwebdesign <github@rdwebdesign.com.br> * Fix prettier Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -268,9 +268,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"]],
|
||||
|
||||
Reference in New Issue
Block a user