#\r
# TODO: cache results and reuse them if get_cached returns a cache copy\r
\r
-require 'uri'\r
-\r
DEMAURO_LEMMA = /<anchor>(.*?)(?: - (.*?))<go href="lemma.php\?ID=(\d+)"\/><\/anchor>/\r
\r
class DictPlugin < Plugin\r
justcheck = params[:justcheck]\r
\r
word = params[:word].downcase\r
- url = @dmwapurl % URI.escape(word)\r
+ url = @dmwapurl % CGI.escape(word)\r
xml = nil\r
info = @bot.httputil.get_response(url) rescue nil\r
xml = info.body if info\r
\r
word = params[:word].join\r
[word, word + "_1"].each { |check|\r
- url = @oxurl % URI.escape(check)\r
+ url = @oxurl % CGI.escape(check)\r
h = @bot.httputil.head(url, :max_redir => 5)\r
if h\r
m.reply("#{word} found: #{url}") unless justcheck\r
justcheck = params[:justcheck]\r
\r
word = params[:word].to_s.downcase\r
- url = @chambersurl % URI.escape(word)\r
+ url = @chambersurl % CGI.escape(word)\r
xml = nil\r
info = @bot.httputil.get_response(url) rescue nil\r
xml = info.body if info\r