Enforce escaping on all template content

This commit is contained in:
Oliver Gorwits
2019-09-23 14:22:00 +01:00
parent 5f378a39ea
commit deb9b62c7f
77 changed files with 392 additions and 387 deletions

View File

@@ -15,7 +15,7 @@
$(document).ready(function() {
var table = $('#ps-data-table').dataTable({
"deferRender": true,
"data": [% results %],
"data": [% results | none %],
"columnDefs": [
{ "sortable": false, "targets": 0 },
{ "searchable": false, "targets": 0 },
@@ -49,7 +49,7 @@ $(document).ready(function() {
if (row.device.dns || row.device.name) {
ddns = '<br>(' + he.encode(row.device.dns || row.device.name) + ')';
}
return '<a href="[% device_ports %]&q=' + encodeURIComponent(data)
return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(data)
+ '&f=' + encodeURIComponent(row.port) + '">' + he.encode(data)
+ ' [' + he.encode(row.port) + ']</a>' + ddns;
}