luci-base: fix rendering of 404 HTML error template
authorJo-Philipp Wich <jo@mein.io>
Tue, 10 Apr 2018 10:03:15 +0000 (12:03 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 10 Apr 2018 10:03:15 +0000 (12:03 +0200)
commit2b516423a0eb14882344faf0de46215e34c5c248
treee462e132c297a48b7dc11240e4eaad098c43b32a
parent48a5864f06528e5e454f6e009ec863122f997415
luci-base: fix rendering of 404 HTML error template

This 404 error template rendering has been broken for a long time due to bad
function environment level in luci.template when invoking the rendering from
the toplevel dispatcher context.

Fix this issue by adding a local function indirection, essentially adding an
additional stack frame.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/dispatcher.lua