diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-18 14:02:08 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-18 14:04:53 +0200 |
commit | 9a7e374e1670b04f506d4d2eecd903c253a8214a (patch) | |
tree | db1d8369b099972261cb1e6a90e8686474b51a8d /data | |
parent | ed4791438c6c4ba2bea48f38316152fdf6afa764 (diff) |
rss plugin: strip whitespace from link, category and author
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/rss.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |