Software /
code /
prosody-modules
Changeset
1017:28e3257d2ae5
mod_pastebin: Ensure base URL always has a trailing / (thanks Masin)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 22 May 2013 12:40:55 +0100 |
parents | 1016:9f7c97e55593 |
children | 1018:7e060edbb548 |
files | mod_pastebin/mod_pastebin.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pastebin/mod_pastebin.lua Sun May 19 22:25:54 2013 +0100 +++ b/mod_pastebin/mod_pastebin.lua Wed May 22 12:40:55 2013 +0100 @@ -30,7 +30,7 @@ local max_summary_length = module:get_option_number("pastebin_summary_length", 150); local html_preview = module:get_option_boolean("pastebin_html_preview", true); -local base_url = module:get_option_string("pastebin_url", module:http_url()); +local base_url = module:get_option_string("pastebin_url", module:http_url()):gsub("/$", "").."/"; -- Seconds a paste should live for in seconds (config is in hours), default 24 hours local expire_after = math.floor(module:get_option_number("pastebin_expire_after", 24) * 3600);