From 0888cb0bfa274ded891ab1415021cded35fa39e4 Mon Sep 17 00:00:00 2001 From: David Gil Date: Thu, 10 Sep 2015 15:06:51 +0200 Subject: [PATCH] adds target _blank and rel nofollow to Comment#body with rinku --- app/models/comment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 586de729c..5836fa103 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -55,7 +55,7 @@ class Comment < ActiveRecord::Base def body unprocessed = super - unprocessed ? Rinku.auto_link(unprocessed).html_safe : unprocessed + unprocessed ? Rinku.auto_link(unprocessed, :all, 'target="_blank" rel="nofollow"').html_safe : unprocessed end def total_votes