Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/action_text/attachables/_remote_image.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<figure class="attachment attachment--preview">
<%= 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) %>
<figcaption class="attachment__caption">
<%= caption %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/event/attachments/_remote_image.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>
11 changes: 11 additions & 0 deletions test/controllers/cards_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<action-text-attachment url="image.png" content-type="image/*" presentation="gallery"></action-text-attachment>'
)

get card_path(card)
assert_response :success
end
end