Correctly render budget description with html & links

This commit is contained in:
Bertocq
2018-01-18 16:18:27 +01:00
parent 170cf5adbd
commit 986ee9c87d
3 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ module TextWithLinksHelper
end
def safe_html_with_links(html)
return html unless html.html_safe?
return html.html_safe unless html.html_safe?
Rinku.auto_link(html, :all, 'target="_blank" rel="nofollow"').html_safe
end

View File

@@ -9,7 +9,7 @@
<h1><%= @budget.name %></h1>
<%= safe_html_with_links @budget.description %>
<%= safe_html_with_links(@budget.description) %>
<%= link_to t("budgets.index.section_header.help"), "#section_help" %>
</div>
<div class="small-12 medium-3 column info padding" data-equalizer-watch>

View File

@@ -9,7 +9,7 @@
<h1><%= @budget.name %></h1>
<%= safe_html_with_links @budget.description %>
<%= safe_html_with_links(@budget.description) %>
</div>
<div class="small-12 medium-3 column info padding" data-equalizer-watch>
<p>