mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 12:45:34 +08:00
pretty text would blow up on an <a tag with no href
This commit is contained in:
parent
160107a712
commit
1837cb769c
@ -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']
|
||||
|
Loading…
x
Reference in New Issue
Block a user