Change fetch link card service to parse as HTML5 (#31814)
This commit is contained in:
parent
9d9901cc5b
commit
a0ea2fa3b0
3 changed files with 22 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue