URI and HTML escape template variables
This commit is contained in:
@@ -17,18 +17,18 @@
|
||||
[% WHILE (row = macs.next) %]
|
||||
<tr>
|
||||
<td><a class="nd_linkcell"
|
||||
href="[% search_node %]&q=[% row.mac | uri %]">[% row.mac %]</a></td>
|
||||
href="[% search_node %]&q=[% row.mac | uri %]">[% row.mac | html_entity %]</a></td>
|
||||
[% IF params.vendor %]
|
||||
<td>[% row.oui.company %]</td>
|
||||
<td>[% row.oui.company | html_entity %]</td>
|
||||
[% END %]
|
||||
<td>IP → MAC</td>
|
||||
<td><a href="[% search_node %]&q=[% row.ip | uri %]">[% row.ip %]</a>
|
||||
<td><a href="[% search_node %]&q=[% row.ip | uri %]">[% row.ip | html_entity %]</a>
|
||||
[% ' <span class="label label-warning">A</span>' IF NOT row.active %]
|
||||
[% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %]
|
||||
</td>
|
||||
[% IF params.stamps %]
|
||||
<td>[% row.time_first_stamp %]</td>
|
||||
<td>[% row.time_last_stamp %]</td>
|
||||
<td>[% row.time_first_stamp | html_entity %]</td>
|
||||
<td>[% row.time_last_stamp | html_entity %]</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% FOREACH node IN row.node_sightings(archive_filter) %]
|
||||
@@ -39,16 +39,16 @@
|
||||
[% END %]
|
||||
<td>Switch Port</td>
|
||||
<td><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% node.device.dns || node.switch %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
|
||||
[% node.switch %] - [% node.port %]</a>
|
||||
href="[% device_ports %]&q=[% node.device.dns || node.switch | uri %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
|
||||
[% node.switch | html_entity %] - [% node.port | html_entity %]</a>
|
||||
[% ' <span class="label label-warning">A</span>' IF NOT node.active %]
|
||||
[% IF node.device.dns AND node.device_port AND node.device_port.name %]
|
||||
([% node.device.dns %] - [% node.device_port.name %])
|
||||
([% node.device.dns | html_entity %] - [% node.device_port.name | html_entity %])
|
||||
[% END %]
|
||||
</td>
|
||||
[% IF params.stamps %]
|
||||
<td>[% node.time_first_stamp %]</td>
|
||||
<td>[% node.time_last_stamp %]</td>
|
||||
<td>[% node.time_first_stamp | html_entity %]</td>
|
||||
<td>[% node.time_last_stamp | html_entity %]</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% END %]
|
||||
@@ -59,13 +59,13 @@
|
||||
<td> </td>
|
||||
[% END %]
|
||||
<td>MAC → IP</td>
|
||||
<td><a href="[% search_node %]&q=[% nodeip.ip | uri %]">[% nodeip.ip %]</a>
|
||||
<td><a href="[% search_node %]&q=[% nodeip.ip | uri %]">[% nodeip.ip | html_entity %]</a>
|
||||
[% ' <span class="label label-warning">A</span>' IF NOT nodeip.active %]
|
||||
[% ' (' _ nodeip.dns.remove(settings.domain_suffix) _ ')' IF nodeip.dns %]
|
||||
</td>
|
||||
[% IF params.stamps %]
|
||||
<td>[% nodeip.time_first_stamp %]</td>
|
||||
<td>[% nodeip.time_last_stamp %]</td>
|
||||
<td>[% nodeip.time_first_stamp | html_entity %]</td>
|
||||
<td>[% nodeip.time_last_stamp | html_entity %]</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user