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 --- health-storage-html.lsp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'health-storage-html.lsp') diff --git a/health-storage-html.lsp b/health-storage-html.lsp index cd9162e..bd2a20a 100644 --- a/health-storage-html.lsp +++ b/health-storage-html.lsp @@ -1,22 +1,22 @@ <% local view = ... %> <% displaydisk = function(disk, name) -io.write("
"..disk.value.."
\n") +io.write("
"..html.html_escape(disk.value).."
\n") io.write('\n') io.write(" \n") io.write(" \n") if tonumber(disk.used) > 0 then - io.write(' \n') end if tonumber(disk.used) < 100 then - io.write(' \n') end io.write(' \n') @@ -24,7 +24,7 @@ io.write(" \n") io.write("
0%
') - if ( tonumber(disk.used) > 10) then io.write(disk.used .. "%") end + if ( tonumber(disk.used) > 10) then io.write(html.html_escape(disk.used) .. "%") end io.write('
') - if ( 90 > tonumber(disk.used)) then io.write((100-disk.used) .. "%") end + if ( 90 > tonumber(disk.used)) then io.write((100-tonumber(disk.used)) .. "%") end io.write('
100%
\n") io.write('\n') io.write(" \n") -io.write(' \n') +io.write(' \n') io.write(" \n") io.write("
'..name..'=Used=Free'..html.html_escape(name)..'=Used=Free
\n") end %> @@ -60,6 +60,6 @@ No RAM Disk mounted <% if view.value.partitions then %>

Disk partitions

-
<%= view.value.partitions.value %>
+
<%= html.html_escape(view.value.partitions.value) %>
<% end %> -- cgit v1.2.3