From d3d9a986ba588bba4f28b856f19f2a75209d3763 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 16 Dec 2008 03:46:17 +0500 Subject: Fixed URL encoding to generate %0x instead of %x --- tools/ejabberd2prosody.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/ejabberd2prosody.lua') diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index 3c3ce945..858d78bb 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -37,7 +37,7 @@ function mkdir(path) --print("mkdir",path); local x = io.popen("mkdir "..path.." 2>&1"):read("*a"); end -function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end +function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end function getpath(username, host, datastore, ext) ext = ext or "dat"; if username then -- cgit v1.2.3