Skip to content

Commit

Permalink
fixup Fix legacy attachment
Browse files Browse the repository at this point in the history
 Sanitze is set up with an allow list of attributes and tags to prevent it from
 removing these.
  • Loading branch information
injms committed Oct 21, 2020
1 parent 79b619b commit 1ffd246
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/content_items/_attachments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<%= render 'govuk_publishing_components/components/govspeak', {
direction: page_text_direction,
} do %>
<%= sanitize(legacy_pre_rendered_documents) %>
<%= sanitize(legacy_pre_rendered_documents, {
tags: %w(a details div h2 img p section span summary),
attributes: %w(alt class data-module href id src),
}) %>
<% end %>
<% else %>
<% attachments.each do |attachment_id| %>
Expand Down

0 comments on commit 1ffd246

Please sign in to comment.