summaryrefslogtreecommitdiffstats
path: root/opennhrp-show-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-01-15 21:44:39 +0000
committerTed Trask <ttrask01@yahoo.com>2009-01-15 21:44:39 +0000
commitbd93652bba291b8c6a5d6f0753aea1a5241f9f6a (patch)
tree627b6414cf8687cae70ed35a94ae8183dfa377a2 /opennhrp-show-html.lsp
parent5734f776f166b9fdf0f1a2d21227bf7ee6ed14b4 (diff)
downloadacf-opennhrp-bd93652bba291b8c6a5d6f0753aea1a5241f9f6a.tar.bz2
acf-opennhrp-bd93652bba291b8c6a5d6f0753aea1a5241f9f6a.tar.xz
Modified html.lua and viewlibrary.lua and all html files to html_escape variables before displaying them.
git-svn-id: svn://svn.alpinelinux.org/acf/opennhrp/trunk@1678 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'opennhrp-show-html.lsp')
-rw-r--r--opennhrp-show-html.lsp12
1 files changed, 6 insertions, 6 deletions
diff --git a/opennhrp-show-html.lsp b/opennhrp-show-html.lsp
index 79847c4..9b5ac46 100644
--- a/opennhrp-show-html.lsp
+++ b/opennhrp-show-html.lsp
@@ -6,12 +6,12 @@ require("viewfunctions")
viewlibrary.dispatch_component("status")
end %>
-<H1><%= data.label %></H1>
+<H1><%= html.html_escape(data.label) %></H1>
<DL>
<%
displayitem(data.value.status)
%>
-<DT><%= data.value.peers_list.label %></DT>
+<DT><%= html.html_escape(data.value.peers_list.label) %></DT>
<DD>
<%
local found
@@ -19,7 +19,7 @@ displayitem(data.value.status)
found = true
%>
<TABLE STYLE='margin-bottom:10px;'>
- <TR><TD STYLE='font-weight:bold;border:none;'><IMG SRC='/skins/static/tango/16x16/places/network-server.png' width='16' height='16' alt> <%= intf %></TD><TD STYLE='border:none;'></TD></TR>
+ <TR><TD STYLE='font-weight:bold;border:none;'><IMG SRC='/skins/static/tango/16x16/places/network-server.png' width='16' height='16' alt> <%= html.html_escape(intf) %></TD><TD STYLE='border:none;'></TD></TR>
<% for i,entries in ipairs(addresses) do
io.write("<TR STYLE='padding-bottom:10px;'><TD WIDTH='150px' STYLE='font-weight:bold;padding-left:20px;border:none;'><IMG SRC='/skins/static/tango/16x16/status/")
@@ -36,13 +36,13 @@ displayitem(data.value.status)
else
io.write("network-error")
end
- io.write(".png' width='16' height='16' title='" .. (entries.Type.descr or "") .. "'> " .. entries["Protocol-Address"].value .. "</TD><TD STYLE='font-weight:bold;border:none;'></TD></TR>\n")
+ io.write(".png' width='16' height='16' title='" .. html.html_escape(entries.Type.descr) .. "'> " .. html.html_escape(entries["Protocol-Address"].value) .. "</TD><TD STYLE='font-weight:bold;border:none;'></TD></TR>\n")
for j,entry in pairs(entries) do
if j ~= "Protocol-Address" then
- io.write("<TR><TD STYLE='font-weight:bold;padding-left:40px;border:none;'>"..entry.label.."</TD><TD STYLE='border:none;'>"..entry.value)
+ io.write("<TR><TD STYLE='font-weight:bold;padding-left:40px;border:none;'>"..html.html_escape(entry.label).."</TD><TD STYLE='border:none;'>"..html.html_escape(entry.value))
if entry.descr then
- io.write(" <I>(" .. entry.descr .. ")</I>")
+ io.write(" <I>(" .. html.html_escape(entry.descr) .. ")</I>")
end
io.write("</TD></TR>\n")
end