summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaine Virta <rane@kapsi.fi>2009-12-09 11:11:13 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-12-21 10:30:44 +0100
commite4d81b0cf2c5158d859c33b6e1cbde442cb183de (patch)
tree001ca3fd5829e2aaf8b56d7d9eed0eaa055661b3
parent11e8895ca5888dc32ca76ec8b17480cd37810ece (diff)
lastfm: use CGI.escape on query part of spotify searches
-rw-r--r--data/rbot/plugins/lastfm.rb2
1 files changed, 1 insertions, 1 deletions
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