diff options
author | Zach LeBar <zach@zachlebar.com> | 1980-02-12 05:06:54 +0000 |
---|---|---|
committer | Zach LeBar <zach@zachlebar.com> | 1980-02-12 05:06:54 +0000 |
commit | 2f26b2eb5374548c3100519c19790398a356c424 (patch) | |
tree | 736c334c27a64962c07ee7f09c693340ca15eb03 | |
parent | 802bcdd64ae2232c633e5460be813766ddf829e0 (diff) | |
download | acf-core-2f26b2eb5374548c3100519c19790398a356c424.tar.bz2 acf-core-2f26b2eb5374548c3100519c19790398a356c424.tar.xz |
Cleaned up HTML being output by 'displaycommandresults()'.
-rw-r--r-- | lib/htmlviewfunctions.lua | 10 |
1 files changed, 5 insertions, 5 deletions
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("<H1>Command Result</H1>\n<DL>\n") + io.write('<div class="command-results"><h1>Command Result</h1>') 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", "<BR>") .. "\n") end - if result.descr then io.write('<P CLASS="descr">' .. string.gsub(html.html_escape(result.descr), "\n", "<BR>") .. "</P>\n") end - if result.errtxt then io.write('<P CLASS="error">' .. string.gsub(html.html_escape(result.errtxt), "\n", "<BR>") .. "</P>\n") end + if type(result.value) == "string" and result.value ~= "" then io.write('<p>' .. string.gsub(html.html_escape(result.value), "\n", "<br/>") .. "</p>") end + if result.descr then io.write('<p>' .. string.gsub(html.html_escape(result.descr), "\n", "<br/>") .. "</p>") end + if result.errtxt then io.write('<p class="error">' .. string.gsub(html.html_escape(result.errtxt), "\n", "<br/>") .. "</p>") end end - io.write("</DL>\n") + io.write('</div><!-- end .command-results -->') end end |