Fixes invalid login page encoding

This commit is contained in:
Simone Mainardi 2018-07-25 18:15:04 +02:00
parent 93bd916302
commit 3eeb37c3f0
3 changed files with 16 additions and 10 deletions

View file

@ -1984,10 +1984,14 @@ end
-- ##############################################
function unescapeHTML (s)
local unesc = function (h)
local res = string.char(tonumber(h, 16))
return res
end
s = string.gsub(s, "+", " ")
s = string.gsub(s, "%%(%x%x)", function (h)
return string.char(tonumber(h, 16))
end)
s = string.gsub(s, "%%(%x%x)", unesc)
return s
end