lib/onebox/helpers.rb in onebox-1.5.11 vs lib/onebox/helpers.rb in onebox-1.5.12
- old
+ new
@@ -19,11 +19,11 @@
def self.clean(html)
html.gsub(/<[^>]+>/, ' ').gsub(/\n/, '')
end
- def self.fetch_response(location, limit = 5, domain = nil,headers=nil)
+ def self.fetch_response(location, limit = 5, domain = nil, headers = nil)
raise Net::HTTPError.new('HTTP redirect too deep', location) if limit == 0
uri = URI(location)
if !uri.host
uri = URI("#{domain}#{location}")
@@ -51,6 +51,5 @@
response.error!
end
end
end
end
-