0
0
Fork 0

Change fetch link card service to parse as HTML5 (#31814)

This commit is contained in:
Mike Dalessio 2024-09-09 06:59:42 -04:00 committed by GitHub
parent 9d9901cc5b
commit a0ea2fa3b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 22 deletions

View file

@ -192,8 +192,8 @@ RSpec.describe FetchLinkCardService do
context 'when encoding problems appear in title tag' do
let(:status) { Fabricate(:status, text: 'Check out http://example.com/latin1_posing_as_utf8_broken') }
it 'does not create a preview card' do
expect(status.preview_card).to be_nil
it 'creates a preview card anyway that replaces invalid bytes with U+FFFD (replacement char)' do
expect(status.preview_card.title).to eq("Tofu <20> l'orange")
end
end
end