Commit a2be178c authored by Matthias Schiffer's avatar Matthias Schiffer

gluon-web: add view helper for JSON-encoded values

Can be used for inserting Lua values into inline JS code.
parent 897ee73d
......@@ -87,6 +87,7 @@ local function dispatch(config, http, request)
pcdata = util.pcdata,
urlencode = proto.urlencode,
attr = attr,
json = json.stringify,
url = function(path) return build_url(http, path) end,
}, { __index = _G }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment