diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-09-24 22:47:27 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-09-24 22:47:27 +0200 |
commit | 5829ccecaf24f2adb47f8f98a778ba9e3d3cc90b (patch) | |
tree | 9f479cb9fac773cfef78febee419da6ec2411668 | |
parent | 31463e4ed415856350b186349435fbd80f1d813a (diff) |
search plugin: handle image in results
Some results from Google can contain <img> tags as their 'text' part, so
use the new ircify_html feature to display them.
-rw-r--r-- | data/rbot/plugins/search.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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}" % { |