FIX: Nokogiri bugs in certain environments

This commit is contained in:
Robin Ward
2013-10-16 12:19:20 -04:00
parent c7aaee907b
commit 15cad17810
2 changed files with 7 additions and 5 deletions

View File

@ -95,8 +95,8 @@ class PostAnalyzer
# Don't include @mentions in the link count
@raw_links = []
cooked_document.search("a[href]").each do |l|
next if link_is_a_mention?(l)
cooked_document.search("a").each do |l|
next if l.attributes['href'].nil? || link_is_a_mention?(l)
url = l.attributes['href'].to_s
@raw_links << url
end