diff --git a/src/lib/documents/editor.integration.test.tsx b/src/lib/documents/editor.integration.test.tsx index 89929e7..28607b3 100644 --- a/src/lib/documents/editor.integration.test.tsx +++ b/src/lib/documents/editor.integration.test.tsx @@ -31,9 +31,7 @@ function createEditor(): Editor { describe('editor schema + sanitizer', () => { it('rejects javascript: link hrefs end to end', () => { const editor = createEditor(); - editor.commands.setContent('
', { - contentType: 'html', - }); + editor.commands.setContent(''); // The unsafe href must not survive into the document. expect(editor.getHTML()).not.toContain('javascript:'); editor.destroy(); @@ -41,9 +39,7 @@ describe('editor schema + sanitizer', () => { it('keeps safe link hrefs', () => { const editor = createEditor(); - editor.commands.setContent('', { - contentType: 'html', - }); + editor.commands.setContent(''); expect(editor.getHTML()).toContain('https://example.com'); editor.destroy(); }); @@ -51,7 +47,7 @@ describe('editor schema + sanitizer', () => { it('drops script content pasted as HTML', () => { const editor = createEditor(); const sanitized = sanitizeHtml('hello
'); - editor.commands.setContent(sanitized, { contentType: 'html' }); + editor.commands.setContent(sanitized); expect(editor.getText()).toContain('hello'); expect(editor.getHTML()).not.toContain('