lib/plagiarism/strategries/yahoo.rb in plagiarism2-0.0.3 vs lib/plagiarism/strategries/yahoo.rb in plagiarism2-0.0.4

- old
+ new

@@ -11,10 +11,10 @@ def exists?(response) doc = Nokogiri::HTML response doc.css('.searchCenterMiddle li').all? do |row| href = row.at_css('.compTitle div').content.strip rescue '' - uri = URI.parse(href =~ /^http/ ? href : 'https://' + href) + uri = URI.parse URI::encode(href =~ /^http/ ? href : 'https://' + href) uri.host =~ whitelists_regex end end end