Changeset

7734:6a52415ed68a

util.datamanager: Shorter pattern
author Kim Alvefur <zash@zash.se>
date Sun, 20 Nov 2016 12:06:36 +0100
parents 7733:601c4d81603b
children 7735:1502ec4f3cbe 7738:0647b821e00a
files util/datamanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/datamanager.lua	Sun Nov 20 12:05:43 2016 +0100
+++ b/util/datamanager.lua	Sun Nov 20 12:06:36 2016 +0100
@@ -53,7 +53,7 @@
 	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)