Mercurial > prosody-hg
comparison plugins/mod_http_errors.lua @ 6054:7a5ddbaf758d
Merge 0.9->0.10
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 02 Apr 2014 17:41:38 +0100 |
| parents | bd0ff8ae98a8 |
| children | 9a749cf8c1ba |
comparison
equal
deleted
inserted
replaced
| 6053:2f93a04564b2 | 6054:7a5ddbaf758d |
|---|---|
| 51 ["'"] = "'", ["\""] = """, ["\n"] = "<br/>", | 51 ["'"] = "'", ["\""] = """, ["\n"] = "<br/>", |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 local function tohtml(plain) | 54 local function tohtml(plain) |
| 55 return (plain:gsub("[<>&'\"\n]", entities)); | 55 return (plain:gsub("[<>&'\"\n]", entities)); |
| 56 | 56 |
| 57 end | 57 end |
| 58 | 58 |
| 59 local function get_page(code, extra) | 59 local function get_page(code, extra) |
| 60 local message = messages[code]; | 60 local message = messages[code]; |
| 61 if always_serve or message then | 61 if always_serve or message then |
