Use luci's urldecode_params to handle query string (#703)

This commit is contained in:
Brett T. Warden 2023-02-10 09:19:09 -08:00 committed by GitHub
parent 2ae6a61630
commit 8f4e05030e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -37,6 +37,7 @@
local nxo = require("nixio")
local ipc = require("luci.ip")
require("luci.http")
require("uci")
function round2(num, idp)
@ -65,10 +66,7 @@ end
function parseQueryString(qs)
local qsa={}
if qs ~=nil then
for i,j in pairs(qs:split("&")) do
z=j:split("=")
qsa[z[1]]=z[2]
end
qsa = luci.http.urldecode_params(qs)
end
return qsa
end