gearheads
/
mastodon
Archived
2
0
Fork 0

Add target=_blank to user note (#2622)

* Add target=_blank to user note

Open new window when click link from user profile in remote instance.

* fix rubocop
gh/stable
Yamagishi Kazutoshi 2017-04-30 07:28:41 +09:00 committed by Eugen Rochko
parent fdcf884cf7
commit 4a5f73c8ae
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,13 @@ class Sanitize
'span' => %w(class), 'span' => %w(class),
}, },
add_attributes: {
'a' => {
'rel' => 'nofollow noopener',
'target' => '_blank',
},
},
protocols: { protocols: {
'a' => { 'href' => HTTP_PROTOCOLS }, 'a' => { 'href' => HTTP_PROTOCOLS },
} }