encode uri and html, don't search counts
This commit is contained in:
@@ -17,28 +17,32 @@ $(document).ready(function() {
|
|||||||
"data": [% results %],
|
"data": [% results %],
|
||||||
"columns": [
|
"columns": [
|
||||||
{
|
{
|
||||||
data: 'ip',
|
"data": 'ip',
|
||||||
render: function(data, type, row, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return '<a href="[% device_ports %]&q=' + data + '">' + (row.dns || row.ip) + '</a>';
|
return '<a href="[% device_ports %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.dns || row.ip) + '</a>';
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
data: 'port_count',
|
"data": 'port_count',
|
||||||
render: function(data, type, full, meta) {
|
"searchable": false,
|
||||||
|
"render": function(data, type, full, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
data: 'ports_in_use',
|
"data": 'ports_in_use',
|
||||||
render: function(data, type, full, meta) {
|
"searchable": false,
|
||||||
|
"render": function(data, type, full, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
data: 'ports_shutdown',
|
"data": 'ports_shutdown',
|
||||||
render: function(data, type, full, meta) {
|
"searchable": false,
|
||||||
|
"render": function(data, type, full, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
data: 'ports_free',
|
"data": 'ports_free',
|
||||||
render: function(data, type, full, meta) {
|
"searchable": false,
|
||||||
|
"render": function(data, type, full, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,4 +51,3 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user