diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-08 09:37:01 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-08 09:37:01 +0000 |
commit | 109fa2a5b63af113df2c6b21d44135efa0d94d70 (patch) | |
tree | b19924dbcd8aab2bcd144800787172c863ebb6be /data/rbot/plugins/freshmeat.rb | |
parent | 74c6e24a38169dd3a03f8d9381d6ff0e6475ffe7 (diff) |
plugins: use CGI.escape instead of URI.escape where appropriate, remove some checks for InvalidURIs that don't make sense anymore, irficy some more html
Diffstat (limited to 'data/rbot/plugins/freshmeat.rb')
-rw-r--r-- | data/rbot/plugins/freshmeat.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/data/rbot/plugins/freshmeat.rb b/data/rbot/plugins/freshmeat.rb index 5a045123..49e73e0d 100644 --- a/data/rbot/plugins/freshmeat.rb +++ b/data/rbot/plugins/freshmeat.rb @@ -1,5 +1,4 @@ require 'rexml/document' -require 'uri/common' class FreshmeatPlugin < Plugin include REXML @@ -11,12 +10,7 @@ class FreshmeatPlugin < Plugin max = params[:limit].to_i search = params[:search].to_s max = 8 if max > 8 - begin - xml = @bot.httputil.get("http://freshmeat.net/search-xml/?orderby=locate_projectname_full_DESC&q=#{URI.escape(search)}") - rescue URI::InvalidURIError, URI::BadURIError => e - m.reply "illegal search string #{search}" - return - end + xml = @bot.httputil.get("http://freshmeat.net/search-xml/?orderby=locate_projectname_full_DESC&q=#{CGI.escape(search)}") unless xml m.reply "search for #{search} failed" return |