Permalink
Browse files

escaped website

  • Loading branch information...
1 parent 234a21a commit 5b3f1460f8bf52b0a89c02f87d2dce35e36c1e89 @vodafon committed Sep 29, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/pageranker.rb
View
@@ -1,9 +1,10 @@
module Pageranker
require 'open-uri'
+ require 'cgi'
def self.check(website)
return nil if website.nil?
- url = "http://toolbarqueries.google.com/search?client=navclient-auto&ch=#{checksum(website)}&ie=UTF-8&oe=UTF-8&features=Rank&q=info:#{website}"
+ url = "http://toolbarqueries.google.com/search?client=navclient-auto&ch=#{checksum(website)}&ie=UTF-8&oe=UTF-8&features=Rank&q=info:#{CGI::escape(website)}"
begin
res = open(url).read
rescue OpenURI::HTTPError

0 comments on commit 5b3f146

Please sign in to comment.