Extract method to use WYSIWYGSanitizer in views
This is similar to methods we use like `sanitize` or `markdown`.
This commit is contained in:
@@ -38,10 +38,10 @@
|
||||
<small><%= t("dashboard.recommended_actions.show_description") %></small>
|
||||
</a>
|
||||
<div id="proposed_action_description_<%= dom_id(proposed_action) %>" class="hide" data-toggler=".hide">
|
||||
<%= WYSIWYGSanitizer.new.sanitize(proposed_action.description) %>
|
||||
<%= wysiwyg(proposed_action.description) %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= WYSIWYGSanitizer.new.sanitize(proposed_action.description) %>
|
||||
<%= wysiwyg(proposed_action.description) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="row expanded">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= WYSIWYGSanitizer.new.sanitize(dashboard_action.description) %>
|
||||
<%= wysiwyg(dashboard_action.description) %>
|
||||
<%= render "dashboard/form" %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<ul>
|
||||
<li><%= first_proposed_action.title %></li>
|
||||
<% if first_proposed_action.description.present? %>
|
||||
<p><%= WYSIWYGSanitizer.new.sanitize(first_proposed_action.description) %></p>
|
||||
<p><%= wysiwyg(first_proposed_action.description) %></p>
|
||||
<% end %>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<ul>
|
||||
<li><%= first_proposed_action.title %></li>
|
||||
<% if first_proposed_action.description.present? %>
|
||||
<p><%= WYSIWYGSanitizer.new.sanitize(first_proposed_action.description) %></p>
|
||||
<p><%= wysiwyg(first_proposed_action.description) %></p>
|
||||
<% end %>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user