mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:21:01 +08:00
FIX: respect nofollow settings for onebox links
This commit is contained in:
@ -454,6 +454,10 @@ class CookedPostProcessor
|
||||
img.parent["style"] = "--aspect-ratio:#{width}/#{height};"
|
||||
end
|
||||
end
|
||||
|
||||
if @cooking_options[:omit_nofollow] || !SiteSetting.add_rel_nofollow_to_user_content
|
||||
@doc.css(".onebox-body a, .onebox a").each { |a| a.remove_attribute("rel") }
|
||||
end
|
||||
end
|
||||
|
||||
def optimize_urls
|
||||
|
Reference in New Issue
Block a user