From 039e43f72e31037a28a2bc55028c7b541aa71d13 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Tue, 27 May 2014 22:13:00 -0400 Subject: [PATCH] encode uri and html, don't search counts --- .../views/ajax/report/portutilization.tt | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Netdisco/share/views/ajax/report/portutilization.tt b/Netdisco/share/views/ajax/report/portutilization.tt index 171f8057..31489df9 100644 --- a/Netdisco/share/views/ajax/report/portutilization.tt +++ b/Netdisco/share/views/ajax/report/portutilization.tt @@ -17,28 +17,32 @@ $(document).ready(function() { "data": [% results %], "columns": [ { - data: 'ip', - render: function(data, type, row, meta) { - return '' + (row.dns || row.ip) + ''; + "data": 'ip', + "render": function(data, type, row, meta) { + return '' + he.encode(row.dns || row.ip) + ''; } }, { - data: 'port_count', - render: function(data, type, full, meta) { + "data": 'port_count', + "searchable": false, + "render": function(data, type, full, meta) { return data.replace(/\B(?=(\d{3})+(?!\d))/g, ","); } }, { - data: 'ports_in_use', - render: function(data, type, full, meta) { + "data": 'ports_in_use', + "searchable": false, + "render": function(data, type, full, meta) { return data.replace(/\B(?=(\d{3})+(?!\d))/g, ","); } }, { - data: 'ports_shutdown', - render: function(data, type, full, meta) { + "data": 'ports_shutdown', + "searchable": false, + "render": function(data, type, full, meta) { return data.replace(/\B(?=(\d{3})+(?!\d))/g, ","); } }, { - data: 'ports_free', - render: function(data, type, full, meta) { + "data": 'ports_free', + "searchable": false, + "render": function(data, type, full, meta) { return data.replace(/\B(?=(\d{3})+(?!\d))/g, ","); } } @@ -47,4 +51,3 @@ $(document).ready(function() { }); -