From 3c67f77555e636f949588c049c2074c70a1cbe33 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 15 Jan 2009 21:44:39 +0000 Subject: 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/alpine-baselayout/trunk@1678 ab2d0c66-481e-0410-8bed-d214d4d58bed --- rc-status-html.lsp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'rc-status-html.lsp') diff --git a/rc-status-html.lsp b/rc-status-html.lsp index 3272af0..a234798 100644 --- a/rc-status-html.lsp +++ b/rc-status-html.lsp @@ -3,15 +3,15 @@ <% if session.editresult then %>

Command Result

- <% if session.editresult.errtxt then io.write('

' .. string.gsub(session.editresult.errtxt, "\n", "
") .. "

\n") end - if session.editresult.descr then io.write('

' .. string.gsub(session.editresult.descr, "\n", "
") .. "

\n") end + <% if session.editresult.errtxt then io.write('

' .. string.gsub(html.html_escape(session.editresult.errtxt), "\n", "
") .. "

\n") end + if session.editresult.descr then io.write('

' .. string.gsub(html.html_escape(session.editresult.descr), "\n", "
") .. "

\n") end for name,val in pairs(session.editresult.value) do - if val.errtxt then io.write('

' .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end + if val.errtxt then io.write('

' .. string.gsub(html.html_escape(val.errtxt), "\n", "
") .. "

\n") end end session.editresult = nil end %> -

<%= view.label %>

+

<%= html.html_escape(view.label) %>

<% if session.permissions.rc.edit then %> @@ -28,14 +28,14 @@ for i,item in ipairs(view.value) do %> for name,val in pairs(result.value) do val.name=name end if result.value.kill.value then result.value.kill.checked = "" end if result.value.system.value then result.value.system.checked = "" end %> - " method="POST"> - - + " method="POST"> + + <% else %> - - + + <% end %> <% end %>
<%= item.servicename %><%= html.form.hidden(result.value.servicename) %><%= html.form.text(result.value.sequence) %><%= html.html_escape(item.servicename) %><%= html.form.hidden(result.value.servicename) %><%= html.form.text(result.value.sequence) %> <%= html.form.checkbox(result.value.kill) %><%= html.form.checkbox(result.value.system) %>
<%= item.servicename %><%= item.sequence %><%= item.kill %><%= item.system %>
<%= html.html_escape(item.servicename) %><%= html.html_escape(item.sequence) %><%= html.html_escape(item.kill) %><%= html.html_escape(item.system) %>
-- cgit v1.2.3