diff --git a/app/helpers/text_with_links_helper.rb b/app/helpers/text_with_links_helper.rb index 55281e89e..ca07daf39 100644 --- a/app/helpers/text_with_links_helper.rb +++ b/app/helpers/text_with_links_helper.rb @@ -6,4 +6,9 @@ module TextWithLinksHelper Rinku.auto_link(sanitized, :all, 'target="_blank" rel="nofollow"').html_safe end + def safe_html_with_links(html) + return html unless html.html_safe? + Rinku.auto_link(html, :all, 'target="_blank" rel="nofollow"').html_safe + end + end