From e4d81b0cf2c5158d859c33b6e1cbde442cb183de Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Wed, 9 Dec 2009 11:11:13 +0200 Subject: [PATCH] lastfm: use CGI.escape on query part of spotify searches --- data/rbot/plugins/lastfm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 027551cb..f5cd3ec7 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -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 -- 2.39.5