diff --git a/app/views/content/list/_cards.html.erb b/app/views/content/list/_cards.html.erb index 7735fb1e..f2fc986f 100644 --- a/app/views/content/list/_cards.html.erb +++ b/app/views/content/list/_cards.html.erb @@ -20,7 +20,7 @@ <% if content.is_a?(Document) %> <%= content.reading_estimate %> <% else %> - <%= ContentFormatterService.show(text: truncate(content.description, length: 140), viewing_user: current_user) %> + <%= sanitize ContentFormatterService.show(text: truncate(content.description, length: 140), viewing_user: current_user) %> <% end %>

@@ -39,7 +39,7 @@ <% if content.is_a?(Document) || (content.description.try(:length) || 0 > 140) %>

- <%= sanitize truncate(content.description || 'This document is blank.', escape: false, length: 420) %> + <%= sanitize ContentFormatterService.show(text: truncate(content.description, length: 420, escape: false), viewing_user: current_user) %>

<% end %> <% if content.respond_to?(:page_tags) %>