summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-11-12 15:05:22 +0000
committerTed Trask <ttrask01@yahoo.com>2015-11-12 15:05:22 +0000
commit8db86bc9d87f21efc9990a9a5a7c8101e12f5da7 (patch)
tree8435a5cfdf7163bf9e0a04e8a4617cad45b15932
parente987a3d4e37572d3538ae5f1421895355eeb9a1a (diff)
downloadacf-core-8db86bc9d87f21efc9990a9a5a7c8101e12f5da7.tar.bz2
acf-core-8db86bc9d87f21efc9990a9a5a7c8101e12f5da7.tar.xz
Modify htmlviewfunctions to display text for cfe objects that do not have an HTML type
-rw-r--r--lib/htmlviewfunctions.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/htmlviewfunctions.lua b/lib/htmlviewfunctions.lua
index 53f4ee5..e443317 100644
--- a/lib/htmlviewfunctions.lua
+++ b/lib/htmlviewfunctions.lua
@@ -234,8 +234,10 @@ function mymodule.displayformitem(myitem, name, header_level, group)
end
io.write((html.form.text(myitem) or ""))
myitem.value = tempval
- else
+ elseif html.form[myitem.type] then
io.write((html.form[myitem.type](myitem) or ""))
+ else
+ io.write((string.gsub(html.html_escape(tostring(myitem.value)), "\n", "<br/>")))
end
if myitem.type ~= "hidden" and myitem.type ~= "group" then
mymodule.displayitemend(myitem, nil, header_level)