mirror of
https://github.com/rxi/lovebird.git
synced 2024-11-15 22:54:21 +00:00
Made env.json page clean up extra dots in query path
This commit is contained in:
parent
571e1489c3
commit
0dbc491f07
@ -227,7 +227,7 @@ end
|
||||
var html = "<table>";
|
||||
for (var i = 0; json.vars[i]; i++) {
|
||||
var x = json.vars[i];
|
||||
var fullpath = (json.path + "." + x.key).replace(/^\.*/, "");
|
||||
var fullpath = json.path + "." + x.key;
|
||||
var k = x.key;
|
||||
if (x.type == "table") {
|
||||
k = "<a href='#' onclick=\"setEnvPath('" + fullpath + "')\">" +
|
||||
@ -264,6 +264,7 @@ lovebird.pages["env.json"] = [[
|
||||
<?lua
|
||||
local t = _G
|
||||
local p = req.parsedurl.query.p or ""
|
||||
p = p:gsub("%.+", "%."):match("^[%.]*(.*)[%.]*$")
|
||||
if p ~= "" then
|
||||
for x in p:gmatch("[^%.]+") do
|
||||
t = t[x]
|
||||
|
Loading…
Reference in New Issue
Block a user