diff --git a/src/test/system/pasting_test.js b/src/test/system/pasting_test.js index 8bcb9f642..fa9891c6d 100644 --- a/src/test/system/pasting_test.js +++ b/src/test/system/pasting_test.js @@ -104,6 +104,21 @@ testGroup("Pasting", { template: "editor_empty" }, () => { delete window.unsanitized }) + test("paste data-trix-attachment unsafe html", async () => { + window.unsanitized = [] + const pasteData = { + "text/plain": "x", + "text/html": `\ + copy
me + `, + } + + await pasteContent(pasteData) + await delay(20) + assert.deepEqual(window.unsanitized, []) + delete window.unsanitized + }) + test("prefers plain text when html lacks formatting", async () => { const pasteData = { "text/html": "a\nb",