adds target _blank and rel nofollow to Comment#body with rinku

This commit is contained in:
David Gil
2015-09-10 15:06:51 +02:00
parent d6562832e7
commit 0888cb0bfa

View File

@@ -55,7 +55,7 @@ class Comment < ActiveRecord::Base
def body def body
unprocessed = super unprocessed = super
unprocessed ? Rinku.auto_link(unprocessed).html_safe : unprocessed unprocessed ? Rinku.auto_link(unprocessed, :all, 'target="_blank" rel="nofollow"').html_safe : unprocessed
end end
def total_votes def total_votes