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-25 15:49:57 +0000
commitcf1295e1422df87611c9b8240b3cfd117d1987db (patch)
tree06b0d7f2adc271e4a0bd27be7517a269d5c1c7cf
parent3cd1a53a42e741b4e78ef9ffa7c4b60b34726511 (diff)
downloadacf-core-cf1295e1422df87611c9b8240b3cfd117d1987db.tar.bz2
acf-core-cf1295e1422df87611c9b8240b3cfd117d1987db.tar.xz
Modify htmlviewfunctions to display text for cfe objects that do not have an HTML type
(cherry picked from commit 8db86bc9d87f21efc9990a9a5a7c8101e12f5da7)
-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)