--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua Thu Mar 03 15:27:39 2011 +0000
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua Sat Mar 05 18:52:43 2011 +0000
@@ -15,6 +15,8 @@
local splitJid = require "util.jid".split;
local config_get = require "core.configmanager".get;
local httpserver = require "net.httpserver";
+local urlencode = require "net.http".urlencode;
+local urldecode = require "net.http".urldecode;
local datamanager = require "util.datamanager";
local data_load, data_getpath = datamanager.load, datamanager.getpath;
local datastore = "muc_log";
@@ -288,6 +290,7 @@
year = year - 2000;
end
local bareDay = str_format("%.02d%.02d%.02d", year, month, day);
+ room = urlencode(room);
local attributes, err = lfs.attributes(path.."/"..bareDay.."/"..room..".dat")
if attributes ~= nil and attributes.mode == "file" then
local s = html.days.bit;
@@ -693,7 +696,9 @@
function handle_request(method, body, request)
local node, host, day = splitUrl(request.url.path);
-
+
+ node = urldecode(node);
+
if muc_hosts ~= nil and html.doc ~= nil then
if node ~= nil and host ~= nil then
local bare = node .. "@" .. host;