FIX: respect nofollow settings for onebox links

This commit is contained in:
Arpit Jalan
2018-03-26 15:54:39 +05:30
parent dcd1d422d1
commit b75b6de982
3 changed files with 23 additions and 0 deletions

View File

@ -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