Fixed URL encoding to generate %0x instead of %x
[prosody.git] / util / datamanager.lua
index e229de1c7369b7afef326987f2ecf75cc021baf9..45da17ddfe6913562cbc32b00d1513df2a93cbad 100644 (file)
@@ -44,7 +44,7 @@ do
        end
 
        encode = function (s)
-               return s and (s:gsub("%W", function (c) return format("%%%x", c:byte()); end));
+               return s and (s:gsub("%W", function (c) return format("%%%02x", c:byte()); end));
        end
 end