summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2023-04-07 05:22:56 -0500
committerthe lemons <citrons@mondecitronne.com>2023-04-07 05:22:56 -0500
commitd70ad64afb539d13c81f30c2c474e91880054974 (patch)
tree4e1ba9245c5624417738e2b1daf97409649c54b7
parentd021b4d9d7940706d63d4cf928295f809192ac3c (diff)
properly interpret space in URL encoding
-rw-r--r--html.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/html.lua b/html.lua
index 3b34cc3..17252e9 100644
--- a/html.lua
+++ b/html.lua
@@ -93,7 +93,7 @@ end
function M.url_decode(str)
return tostring(str):gsub('%%(%x%x)', function(c)
return string.char(tonumber(c, 16))
- end)
+ end):gsub('%+', " ")
end
return M