Software / code / prosody
Comparison
plugins/mod_http_errors.lua @ 7492:9a749cf8c1ba
mod_http_errors: Add a newline after end of HTML
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 12 Jul 2016 10:39:04 +0200 |
| parent | 5776:bd0ff8ae98a8 |
| child | 8363:e2460edc2a2f |
comparison
equal
deleted
inserted
replaced
| 7491:491975f5d383 | 7492:9a749cf8c1ba |
|---|---|
| 41 <body> | 41 <body> |
| 42 <h1>$title</h1> | 42 <h1>$title</h1> |
| 43 <p>$message</p> | 43 <p>$message</p> |
| 44 <p>$extra</p> | 44 <p>$extra</p> |
| 45 </body> | 45 </body> |
| 46 </html>]]; | 46 </html> |
| 47 ]]; | |
| 47 html = html:gsub("%s%s+", ""); | 48 html = html:gsub("%s%s+", ""); |
| 48 | 49 |
| 49 local entities = { | 50 local entities = { |
| 50 ["<"] = "<", [">"] = ">", ["&"] = "&", | 51 ["<"] = "<", [">"] = ">", ["&"] = "&", |
| 51 ["'"] = "'", ["\""] = """, ["\n"] = "<br/>", | 52 ["'"] = "'", ["\""] = """, ["\n"] = "<br/>", |