changeset 118:7eadcf0a0190

mod_muc_log_http: gsub return not only the string in cases the pattern is not found.
author Thilo Cestonaro <thilo@cestona.ro>
date Fri, 15 Jan 2010 09:12:55 +0100 (2010-01-15)
parents ecf05eb2d833
children e6592d8305cb
files mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Thu Jan 14 15:40:10 2010 +0100
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Fri Jan 15 09:12:55 2010 +0100
@@ -585,7 +585,8 @@
 			if previousDay then
 				previousDay = html.day.dayLink:gsub("###DAY###", previousDay):gsub("###TEXT###", "&lt;&lt; previous day");
 			end
-			tmp = html.day.body:gsub("###DAY_STUFF###", ret:gsub("%%", "%%%%")):gsub("###JID###", bareRoomJid);
+			ret = ret:gsub("%%", "%%%%");
+			tmp = html.day.body:gsub("###DAY_STUFF###", ret):gsub("###JID###", bareRoomJid);
 			tmp = tmp:gsub("###YEAR###", year):gsub("###MONTH###", month):gsub("###DAY###", day);
 			tmp = tmp:gsub("###TITLE_STUFF###", html.day.title:gsub("###TITLE###", roomSubject));
 			tmp = tmp:gsub("###STATUS_CHECKED###", config.showStatus and "checked='checked'" or "");