FIX: Skip upload if HTML cannot be parsed (#12971)

This commit is contained in:
Bianca Nenciu
2021-05-14 16:52:40 +03:00
committed by GitHub
parent 3a1b05f219
commit c0679022e7
2 changed files with 6 additions and 1 deletions

View File

@@ -54,6 +54,11 @@ RSpec.describe InlineUploads do
MD
end
it "should work with invalid img tags" do
md = '<img data-id="<>">'
expect(InlineUploads.process(md)).to eq(md)
end
it "should not correct code blocks" do
md = "`<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>`"