aboutsummaryrefslogtreecommitdiffstats
path: root/util/datamanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-11-21 02:40:47 +0100
committerKim Alvefur <zash@zash.se>2016-11-21 02:40:47 +0100
commitfd4206fdb2dc539efb8c2275dbaf3599a72c4933 (patch)
tree62ffc114d6f84139c60043dba1936d9606f9b6ba /util/datamanager.lua
parent9d8ddba6ca4e2fcdb8939e521fd194fc0d34f680 (diff)
parent58a712e247dbaede24c3297260bae145e0ede16e (diff)
downloadprosody-fd4206fdb2dc539efb8c2275dbaf3599a72c4933.tar.gz
prosody-fd4206fdb2dc539efb8c2275dbaf3599a72c4933.zip
Merge 0.10->trunk
Diffstat (limited to 'util/datamanager.lua')
-rw-r--r--util/datamanager.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 2884b942..585bb83d 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -50,10 +50,10 @@ local _ENV = nil;
---- utils -----
local encode, decode;
do
- local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber("0x"..k)); return t[k]; end });
+ local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber(k, 16)); return t[k]; end });
decode = function (s)
- return s and (s:gsub("+", " "):gsub("%%([a-fA-F0-9][a-fA-F0-9])", urlcodes));
+ return s and (s:gsub("%%(%x%x)", urlcodes));
end
encode = function (s)