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
commit5759ed4bd315c197324c65375be019040d273203 (patch)
tree62ffc114d6f84139c60043dba1936d9606f9b6ba /util/datamanager.lua
parentfa06e78161ae895c625f78ed745766d4569d6876 (diff)
parentf36fed39e8110ee3c36e0587811ce3268ae6690e (diff)
downloadprosody-5759ed4bd315c197324c65375be019040d273203.tar.gz
prosody-5759ed4bd315c197324c65375be019040d273203.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)