From 9d19d55d6492b45392890dbe7cbb11ab1bfb4ee2 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 23 Mar 2008 01:15:27 +0100 Subject: rss plugin: make htmlinfo input filter less greedy --- data/rbot/plugins/rss.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 8f16509e..226579dd 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -366,11 +366,17 @@ class RSSFeedsPlugin < Plugin } end + FEED_NS = %r{xmlns.*http://(purl\.org/rss|www.w3c.org/199/02/22-rdf)} def htmlinfo_filter(s) return nil unless s[:headers] and s[:headers]['x-rbot-location'] + return nil unless s[:headers]['content-type'].first.match(/xml|rss|atom|rdf/i) or + s[:text].include?("