Skip to content

Commit

Permalink
Add target=_blank to user note (mastodon#2622)
Browse files Browse the repository at this point in the history
* Add target=_blank to user note

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

* fix rubocop
  • Loading branch information
ykzts authored and Gargron committed Apr 29, 2017
1 parent fdcf884 commit 4a5f73c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/lib/sanitize_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ module Config
'span' => %w(class),
},

add_attributes: {
'a' => {
'rel' => 'nofollow noopener',
'target' => '_blank',
},
},

protocols: {
'a' => { 'href' => HTTP_PROTOCOLS },
}
Expand Down

0 comments on commit 4a5f73c

Please sign in to comment.