From 986ee9c87dfb5d280b23faf760b198ec6d22be8c Mon Sep 17 00:00:00 2001 From: Bertocq Date: Thu, 18 Jan 2018 16:18:27 +0100 Subject: [PATCH] Correctly render budget description with html & links --- app/helpers/text_with_links_helper.rb | 2 +- app/views/budgets/index.html.erb | 2 +- app/views/budgets/show.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/text_with_links_helper.rb b/app/helpers/text_with_links_helper.rb index ac965dafa..baff460a1 100644 --- a/app/helpers/text_with_links_helper.rb +++ b/app/helpers/text_with_links_helper.rb @@ -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 diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index dd86ecb71..71d439a98 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -9,7 +9,7 @@

<%= @budget.name %>

- <%= safe_html_with_links @budget.description %> + <%= safe_html_with_links(@budget.description) %> <%= link_to t("budgets.index.section_header.help"), "#section_help" %>
diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index 99e9cae3c..54d87498f 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -9,7 +9,7 @@

<%= @budget.name %>

- <%= safe_html_with_links @budget.description %> + <%= safe_html_with_links(@budget.description) %>