adds html auto link helper

This commit is contained in:
Juanjo Bazán
2015-09-13 18:02:19 +02:00
parent d6bed921bf
commit 4c4c467b3e

View File

@@ -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