]> BookStack Code Mirror - bookstack/commitdiff
Lexical: Updated tests after link changes lexical_jul25 5731/head
authorDan Brown <redacted>
Fri, 25 Jul 2025 13:25:02 +0000 (14:25 +0100)
committerDan Brown <redacted>
Fri, 25 Jul 2025 13:25:02 +0000 (14:25 +0100)
resources/js/wysiwyg/lexical/link/__tests__/unit/LexicalAutoLinkNode.test.ts
resources/js/wysiwyg/lexical/link/__tests__/unit/LexicalLinkNode.test.ts

index 0f35136821be7d88c57dfb891b8934c1c286e5f9..1103f73d3dc726f4d45030bd4ed3c402ae0639c4 100644 (file)
@@ -273,18 +273,6 @@ describe('LexicalAutoAutoLinkNode tests', () => {
       });
     });
 
-    test('AutoLinkNode.createDOM() sanitizes javascript: URLs', async () => {
-      const {editor} = testEnv;
-
-      await editor.update(() => {
-        // eslint-disable-next-line no-script-url
-        const autoLinkNode = new AutoLinkNode('javascript:alert(0)');
-        expect(autoLinkNode.createDOM(editorConfig).outerHTML).toBe(
-          '<a href="about:blank" class="my-autolink-class"></a>',
-        );
-      });
-    });
-
     test('AutoLinkNode.updateDOM()', async () => {
       const {editor} = testEnv;
 
index 1aff9186306a25d008000bb19f4744e1728c49ea..c50450302f8dfd11ff8272b0477813ef6206d114 100644 (file)
@@ -218,18 +218,6 @@ describe('LexicalLinkNode tests', () => {
       });
     });
 
-    test('LinkNode.createDOM() sanitizes javascript: URLs', async () => {
-      const {editor} = testEnv;
-
-      await editor.update(() => {
-        // eslint-disable-next-line no-script-url
-        const linkNode = new LinkNode('javascript:alert(0)');
-        expect(linkNode.createDOM(editorConfig).outerHTML).toBe(
-          '<a href="about:blank" class="my-link-class"></a>',
-        );
-      });
-    });
-
     test('LinkNode.updateDOM()', async () => {
       const {editor} = testEnv;