2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:36:40 +08:00

FIX: Don't extract links from empty quotes

This commit is contained in:
Robin Ward 2014-05-20 17:20:52 -04:00
parent 010da29957
commit 64355c989e
2 changed files with 5 additions and 1 deletions

View file

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