]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
lastfm: use CGI.escape on query part of spotify searches
authorRaine Virta <rane@kapsi.fi>
Wed, 9 Dec 2009 09:11:13 +0000 (11:11 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 21 Dec 2009 09:30:44 +0000 (10:30 +0100)
data/rbot/plugins/lastfm.rb

index 027551cb9c42e10c33d5a63b4014ab8d049a9ac7..f5cd3ec7c7ba8a699a4c266ac874a1a4fac81d55 100644 (file)
@@ -18,7 +18,7 @@
 module Spotify
   def self.get(service, method, query, page=1)
     query.tr!('-','')
-    url = URI.escape("http://ws.spotify.com/#{service}/1/#{method}?q=#{query}&page=#{page}")
+    url = "http://ws.spotify.com/#{service}/1/#{method}?q=#{CGI.escape(query)}&page=#{page}"
     xml = Irc::Utils.bot.httputil.get_response(url).body
     return REXML::Document.new(xml).root
   end