Prevent empty html to be safe rendered to html with links
This commit is contained in:
@@ -7,6 +7,7 @@ module TextWithLinksHelper
|
||||
end
|
||||
|
||||
def safe_html_with_links(html)
|
||||
return if html.nil?
|
||||
return html.html_safe unless html.html_safe?
|
||||
Rinku.auto_link(html, :all, 'target="_blank" rel="nofollow"').html_safe
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user