equal
deleted
inserted
replaced
84 end |
84 end |
85 return t; |
85 return t; |
86 end |
86 end |
87 |
87 |
88 function createDoc(body, title) |
88 function createDoc(body, title) |
89 assert(body, "<nil> HTTP response"); |
89 if not body then |
|
90 return { status = "404 Not Found", body = "<h1>Page Not Found</h1>Sorry, we couldn't find what you were looking for :(" }; |
|
91 end |
90 body = body:gsub("%%", "%%%%"); |
92 body = body:gsub("%%", "%%%%"); |
91 return html.doc:gsub("###BODY_STUFF###", body) |
93 return html.doc:gsub("###BODY_STUFF###", body) |
92 :gsub("<title>muc_log</title>", "<title>"..(title and htmlEscape(title) or "Chatroom logs").."</title>"); |
94 :gsub("<title>muc_log</title>", "<title>"..(title and htmlEscape(title) or "Chatroom logs").."</title>"); |
93 end |
95 end |
94 |
96 |