# HG changeset patch # User Mikael Berthe # Date 1444646547 -7200 # Node ID 01a4b9048880927d7a6b06ac5e6d965d36aedd4c # Parent 63ee968309d4817ee1e4a7767add8d7f9d875a08 Fix mcabber_bts diff -r 63ee968309d4 -r 01a4b9048880 mcbot/cmds/mcabber_bts.lua --- a/mcbot/cmds/mcabber_bts.lua Fri Apr 03 22:49:15 2015 +0200 +++ b/mcbot/cmds/mcabber_bts.lua Mon Oct 12 12:42:27 2015 +0200 @@ -23,7 +23,7 @@ num = tonumber(num); if not num then return nil end local issue = {} - local btsurl = "https://bitbucket.org/McKael/mcabber-crew/issue/" + local btsurl = "https://bitbucket.org/McKael/mcabber-crew/issues/" issue.id = tostring(num) issue.url = btsurl..issue.id.."/" @@ -31,16 +31,21 @@ if not data then return nil end local title = data:match("#"..issue.id.."%s*-%s*(.*)%s*—") if not title then return nil end - issue.title = title:gsub(""", "\""):gsub("&", "&") + issue.title = title + issue.title = issue.title:gsub(""", "\""):gsub("&", "&") issue.title = issue.title:gsub("<", "<"):gsub(">", ">") issue.title = issue.title:gsub("'", "'") + issue.title = issue.title:gsub("[%s\n]+$", "") -- trailing newlines -- Get Status - item = data:match("Status:%s*%s*]*>(.-)") + item = data:match('%s*]*>(.-)") + item = data:match('" end