Fixed bad replace string on for :gsub() on env.json page

This commit is contained in:
rxi 2015-08-21 19:47:47 +01:00
parent 991a723c5b
commit 744c2ee99b

View File

@ -380,7 +380,7 @@ lovebird.pages["env.json"] = [[
<?lua
local t = _G
local p = req.parsedurl.query.p or ""
p = p:gsub("%.+", "%."):match("^[%.]*(.*)[%.]*$")
p = p:gsub("%.+", "."):match("^[%.]*(.*)[%.]*$")
if p ~= "" then
for x in p:gmatch("[^%.]+") do
t = t[x] or t[tonumber(x)]