From 2f26b2eb5374548c3100519c19790398a356c424 Mon Sep 17 00:00:00 2001 From: Zach LeBar Date: Tue, 12 Feb 1980 05:06:54 +0000 Subject: Cleaned up HTML being output by 'displaycommandresults()'. --- lib/htmlviewfunctions.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/htmlviewfunctions.lua') diff --git a/lib/htmlviewfunctions.lua b/lib/htmlviewfunctions.lua index 3d6efde..3db6618 100644 --- a/lib/htmlviewfunctions.lua +++ b/lib/htmlviewfunctions.lua @@ -257,13 +257,13 @@ function displaycommandresults(commands, session, preserveerrors) end end if #cmdresult > 0 then - io.write("

Command Result

\n
\n") + io.write('

Command Result

') for i,result in ipairs(cmdresult) do - if type(result.value) == "string" and result.value ~= "" then io.write(string.gsub(html.html_escape(result.value), "\n", "
") .. "\n") end - if result.descr then io.write('

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

\n") end - if result.errtxt then io.write('

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

\n") end + if type(result.value) == "string" and result.value ~= "" then io.write('

' .. string.gsub(html.html_escape(result.value), "\n", "
") .. "

") end + if result.descr then io.write('

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

") end + if result.errtxt then io.write('

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

") end end - io.write("
\n") + io.write('') end end -- cgit v1.2.3