Skip to content

Commit

Permalink
moved to helper
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVajnagi committed Jan 15, 2025
1 parent 0a60823 commit bf3d5f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/helpers/calculators_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ def old_calculator_items
{ image: "money_to_spent.png", data_target: "moneyWillBeSpent", text: t(".money_will_be_spent") },
{ image: "money_spent.png", data_target: "moneySpent", text: t(".money_spent") }]
end

def sanitized_notes(notes)
sanitize(notes, tags: %w[p strong em ul li a div span img], attributes: %w[href target class src alt style])
end
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% if calculator.uk_notes.present? || calculator.en_notes.present? %>
<section class="description-section">
<div class="description-section">
<%= sanitize(calculator.notes, tags: %w[p strong em ul li a div span img], attributes: %w[href target class src alt style]) %>
<%= sanitized_notes(calculator.notes) %>
</div>
</section>
<% end %>

0 comments on commit bf3d5f6

Please sign in to comment.