mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 23:49:34 +08:00
FIX: respect nofollow settings for onebox links
This commit is contained in:
@ -273,6 +273,7 @@ module PrettyText
|
||||
uri.host.ends_with?("." << site_uri.host) ||
|
||||
whitelist.any? { |u| uri.host == u || uri.host.ends_with?("." << u) }
|
||||
# we are good no need for nofollow
|
||||
l.remove_attribute("rel")
|
||||
else
|
||||
l["rel"] = "nofollow noopener"
|
||||
end
|
||||
|
Reference in New Issue
Block a user