diff --git a/app/helpers/text_with_links_helper.rb b/app/helpers/text_with_links_helper.rb index 698990538..e1d8dbc54 100644 --- a/app/helpers/text_with_links_helper.rb +++ b/app/helpers/text_with_links_helper.rb @@ -8,8 +8,8 @@ module TextWithLinksHelper def auto_link_already_sanitized_html(html) return if html.nil? - html = ActiveSupport::SafeBuffer.new(html) if html.is_a?(String) - return html.html_safe unless html.html_safe? + raise "Could not add links because the content is not safe" unless html.html_safe? + Rinku.auto_link(html, :all, 'target="_blank" rel="nofollow"').html_safe end