util.datamanager: Shorter pattern

This commit is contained in:
Kim Alvefur 2016-11-20 12:06:36 +01:00
parent f0bd3ec403
commit f36fed39e8

View file

@ -53,7 +53,7 @@ do
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("%%([a-fA-F0-9][a-fA-F0-9])", urlcodes));
return s and (s:gsub("%%(%x%x)", urlcodes));
end
encode = function (s)