diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-14 21:56:20 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-14 21:56:20 +0000 |
commit | d611c8bfc1d1a240b30a6757229bcc3c8bb697db (patch) | |
tree | 82d901db8cd6db415b0c827b10688fa87bb2c716 /data/rbot/plugins/twitter.rb | |
parent | 7700f617df0b6de18fa50d33203b85a32d85a39f (diff) |
twitter plugin: CGI.escape, not URI.escape (thanks hlb)
Diffstat (limited to 'data/rbot/plugins/twitter.rb')
-rw-r--r-- | data/rbot/plugins/twitter.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/data/rbot/plugins/twitter.rb b/data/rbot/plugins/twitter.rb index d1c6bd69..f04ca673 100644 --- a/data/rbot/plugins/twitter.rb +++ b/data/rbot/plugins/twitter.rb @@ -12,6 +12,7 @@ # twitter whenever require 'rexml/rexml' +require 'cgi' class TwitterPlugin < Plugin def initialize @@ -86,7 +87,7 @@ class TwitterPlugin < Plugin uri = "http://#{URI.escape(@registry[m.sourcenick + "_username"])}:#{URI.escape(@registry[m.sourcenick + "_password"])}@twitter.com/statuses/update.xml" - response = @bot.httputil.post(uri, "status=#{URI.escape(params[:status].to_s)}") + response = @bot.httputil.post(uri, "status=#{CGI.escape(params[:status].to_s)}") debug response if response.class == Net::HTTPOK |