Add noopener and/or noreferrer (#12202)

This commit is contained in:
BSKY
2019-10-25 05:44:42 +09:00
committed by Eugen Rochko
parent 237293fd8c
commit fccf83e1f2
27 changed files with 46 additions and 45 deletions

View File

@ -251,7 +251,7 @@ class Formatter
def link_to_url(entity, options = {})
url = Addressable::URI.parse(entity[:url])
html_attrs = { target: '_blank', rel: 'nofollow noopener' }
html_attrs = { target: '_blank', rel: 'nofollow noopener noreferrer' }
html_attrs[:rel] = "me #{html_attrs[:rel]}" if options[:me]

View File

@ -45,7 +45,7 @@ class Sanitize
add_attributes: {
'a' => {
'rel' => 'nofollow noopener',
'rel' => 'nofollow noopener noreferrer',
'target' => '_blank',
},
},