From: Giuseppe Bilotta Date: Fri, 18 Jul 2008 12:02:08 +0000 (+0200) Subject: rss plugin: strip whitespace from link, category and author X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=9a7e374e1670b04f506d4d2eecd903c253a8214a;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git rss plugin: strip whitespace from link, category and author --- diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 9d48108e..77d897ca 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -1035,10 +1035,13 @@ class RSSFeedsPlugin < Plugin desc = "(?)" end - link = item.link.href rescue item.link.chomp rescue nil + link = item.link.href rescue item.link rescue nil + link.strip! if link category = select_nonempty((item.category.content rescue nil), (item.dc_subject rescue nil)) + category.strip! if category author = select_nonempty((item.author.name.content rescue nil), (item.dc_creator rescue nil), (item.author rescue nil)) + author.strip! if author line1 = nil line2 = nil