From 5829ccecaf24f2adb47f8f98a778ba9e3d3cc90b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 24 Sep 2009 22:47:27 +0200 Subject: search plugin: handle image in results Some results from Google can contain tags as their 'text' part, so use the new ircify_html feature to display them. --- data/rbot/plugins/search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/search.rb b/data/rbot/plugins/search.rb index e7712f77..aec8b134 100644 --- a/data/rbot/plugins/search.rb +++ b/data/rbot/plugins/search.rb @@ -103,7 +103,7 @@ class SearchPlugin < Plugin n = 0 results = results[0...hits].map { |res| n += 1 - t = Utils.decode_html_entities res[2].gsub(filter, '').strip + t = res[2].ircify_html(:img => "[%{src} %{alt} %{dimensions}]").strip u = URI.unescape(res[0] || res[1]) urls.push(u) "%{n}%{b}%{t}%{b}%{sep}%{u}" % { -- cgit v1.2.3