diff --git a/app/views/action_text/attachables/_remote_image.html.erb b/app/views/action_text/attachables/_remote_image.html.erb index 174a95c5ee..f71f5dcaa0 100644 --- a/app/views/action_text/attachables/_remote_image.html.erb +++ b/app/views/action_text/attachables/_remote_image.html.erb @@ -1,5 +1,5 @@
- <%= image_tag remote_image.url, width: remote_image.width, height: remote_image.height %> + <%= image_tag remote_image.url, skip_pipeline: true, width: remote_image.width, height: remote_image.height %> <% if caption = remote_image.try(:caption) %>
<%= caption %> diff --git a/app/views/events/event/attachments/_remote_image.html.erb b/app/views/events/event/attachments/_remote_image.html.erb index baec7f6327..0eae78428b 100644 --- a/app/views/events/event/attachments/_remote_image.html.erb +++ b/app/views/events/event/attachments/_remote_image.html.erb @@ -1 +1 @@ -<%= image_tag remote_image.url, class: "attachment attachment--image", width: remote_image.width, height: remote_image.height %> +<%= image_tag remote_image.url, skip_pipeline: true, class: "attachment attachment--image", width: remote_image.width, height: remote_image.height %> diff --git a/test/controllers/cards_controller_test.rb b/test/controllers/cards_controller_test.rb index fd83eb5772..ea5d4e50ee 100644 --- a/test/controllers/cards_controller_test.rb +++ b/test/controllers/cards_controller_test.rb @@ -121,4 +121,15 @@ class CardsControllerTest < ActionDispatch::IntegrationTest assert_redirected_to boards(:writebook) end + + test "show card with comment containing malformed remote image attachment" do + card = cards(:logo) + card.comments.create!( + creator: users(:kevin), + body: '' + ) + + get card_path(card) + assert_response :success + end end