summaryrefslogtreecommitdiffstats
path: root/lib/htmlviewfunctions.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2019-09-11 15:52:21 +0000
committerTed Trask <ttrask01@yahoo.com>2019-09-11 15:52:21 +0000
commit54ca1ac539322e966a7f68fe075de2779dc59320 (patch)
tree21560b8d9043b8c327af13a34b18f8bd8250c865 /lib/htmlviewfunctions.lua
parent825a6bb26224144600791af09bb4d26de2273958 (diff)
downloadacf-core-54ca1ac539322e966a7f68fe075de2779dc59320.tar.bz2
acf-core-54ca1ac539322e966a7f68fe075de2779dc59320.tar.xz
Fix HTML view for hidden tables
Diffstat (limited to 'lib/htmlviewfunctions.lua')
-rw-r--r--lib/htmlviewfunctions.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/htmlviewfunctions.lua b/lib/htmlviewfunctions.lua
index 4cee340..b18e35c 100644
--- a/lib/htmlviewfunctions.lua
+++ b/lib/htmlviewfunctions.lua
@@ -140,7 +140,11 @@ function mymodule.displayitem(myitem, page_info, header_level, name, group)
if myitem.class then
class = ' class="'..html.html_escape(myitem.class)..'"'
end
- io.write("<p"..class..">"..string.gsub(html.html_escape(tostring(myitem.value)), "\n", "<br/>") .. "</p>\n")
+ local value = tostring(myitem.value)
+ if type(myitem.value) == "table" then
+ value = table.concat(myitem.value, "\n")
+ end
+ io.write("<p"..class..">"..string.gsub(html.html_escape(value), "\n", "<br/>") .. "</p>\n")
mymodule.displayitemend(myitem, page_info, header_level)
end
end