Gracefully handle ill-formed remote images in rich text
A better fix has been proposed upstream at https://github.com/rails/rails/pull/56283 but this should be fine in the meantime. ref: https://app.fizzy.do/5986089/cards/3188
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user