diff --git a/lib/rss_feed.rb b/lib/rss_feed.rb index 767a0eb413..76255bc003 100644 --- a/lib/rss_feed.rb +++ b/lib/rss_feed.rb @@ -18,7 +18,9 @@ def get_articles(count = 3) feed = RSS::Parser.parse(rss, false) unless feed.nil? feed.items.first(count).each do |item| - output << item.title.strip + "\n" + item.link.strip + title = item.title.kind_of?(String) ? item.title : item.title.content + link = item.link.kind_of?(String) ? item.link : item.link.href + output << title.to_s.strip + "\n" + link.to_s.strip end end end