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/urban.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/urban.rb')
-rw-r--r-- | data/rbot/plugins/urban.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb index 1a4b9d74..9b547644 100644 --- a/data/rbot/plugins/urban.rb +++ b/data/rbot/plugins/urban.rb @@ -16,7 +16,7 @@ class UrbanPlugin < Plugin end end # we give a very high 'skip' because this will allow us to get the number of definitions by retrieving the previous definition - uri = "http://www.urbanwap.com/search.php?term=#{URI.escape words}&skip=65536" + uri = "http://www.urbanwap.com/search.php?term=#{CGI.escape words}&skip=65536" page = @bot.httputil.get(uri) if page.nil? m.reply "Couldn't retrieve an urban dictionary definition of #{words}" @@ -37,7 +37,7 @@ class UrbanPlugin < Plugin n = numdefs end if n < numdefs - uri = "http://www.urbanwap.com/search.php?term=#{URI.escape words}&skip=#{n-1}" + uri = "http://www.urbanwap.com/search.php?term=#{CGI.escape words}&skip=#{n-1}" page = @bot.httputil.get(uri) if page.nil? case n % 10 |