logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 4a5f73c8aef7500a0efe7d800447e288674bf54a
parent: fdcf884cf719b682e413ee047542861b5a5cf3b7
Author: Yamagishi Kazutoshi <ykzts@desire.sh>
Date:   Sun, 30 Apr 2017 07:28:41 +0900

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

Diffstat:

Mapp/lib/sanitize_config.rb7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb @@ -12,6 +12,13 @@ class Sanitize 'span' => %w(class), }, + add_attributes: { + 'a' => { + 'rel' => 'nofollow noopener', + 'target' => '_blank', + }, + }, + protocols: { 'a' => { 'href' => HTTP_PROTOCOLS }, }