mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't allow links with no href
This commit is contained in:
@@ -111,9 +111,9 @@ class PostAnalyzer
|
||||
return @raw_links if @raw_links.present?
|
||||
|
||||
@raw_links = []
|
||||
cooked_stripped.css("a[href]").each do |l|
|
||||
cooked_stripped.css("a").each do |l|
|
||||
# Don't include @mentions in the link count
|
||||
next if l['href'].blank? || link_is_a_mention?(l)
|
||||
next if link_is_a_mention?(l)
|
||||
@raw_links << l['href'].to_s
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user