Permalink
Browse files

Fix bug on images

  • Loading branch information...
1 parent cd61068 commit c5ff93f6c661048ce8bb528ec71bbaee563e54ce @jaimeiniesta committed Jul 23, 2012
Showing with 4,261 additions and 20 deletions.
  1. +2 −1 lib/meta_inspector/scraper.rb
  2. +4,232 −0 spec/fixtures/twitter_w3clove.response
  3. +27 −19 spec/metainspector_spec.rb
@@ -154,12 +154,13 @@ def parsed_links
def parsed_images
@parsed_images ||= parsed_document.search('//img') \
- .reject{|i| i.attributes['src'].blank? } \
+ .reject{|i| (i.attributes['src'].nil? || i.attributes['src'].value.empty?) } \
.map{ |i| i.attributes['src'].value }.uniq
end
# Stores the error for later inspection
def add_fatal_error(error)
+ warn error
@errors << error
end
Oops, something went wrong.

0 comments on commit c5ff93f

Please sign in to comment.