From a70a0879fe06aaa9c45cacc04a34e64185e5168b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 24 Mar 2008 11:26:35 +0100 Subject: [PATCH] slashdot plugin: fix title handling in htmlinfo filter --- data/rbot/plugins/slashdot.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/slashdot.rb b/data/rbot/plugins/slashdot.rb index 657cc009..71411458 100644 --- a/data/rbot/plugins/slashdot.rb +++ b/data/rbot/plugins/slashdot.rb @@ -23,8 +23,9 @@ class SlashdotPlugin < Plugin h = Hpricot(s[:text]) # If we have no title tag in a head tag, return as this is not # a /. page (it's probably a Slashdot RSS - return nil if h/"head/title".empty? - title = (h/"head/title").first.to_html.ircify_html + ht = h/"head/title" + return nil if ht.empty? + title = ht.first.to_html.ircify_html arts = (h/"div.article") return nil if arts.empty? if arts.length > 1 -- 2.39.5