pretty text would blow up on an <a tag with no href

This commit is contained in:
Sam 2013-08-01 16:00:17 +10:00
parent 160107a712
commit 1837cb769c
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ module PrettyText
# remove href inside quotes
doc.css("aside.quote a").each { |l| l["href"] = "" }
# extract all links from the post
doc.css("a").each { |l| links << l["href"] unless l["href"].empty? }
doc.css("a").each { |l| links << l["href"] unless l["href"].blank? }
# extract links to quotes
doc.css("aside.quote").each do |a|
topic_id = a['data-topic']