From 0dd26e124c7ca43e9b4c2ed08ae49a9636c2052e Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Tue, 31 Mar 2026 17:22:02 -0700 Subject: [PATCH] remove referrers for links from editable docs --- components/Blocks/TextBlock/mountProsemirror.ts | 2 +- components/Blocks/TextBlock/schema.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Blocks/TextBlock/mountProsemirror.ts b/components/Blocks/TextBlock/mountProsemirror.ts index 6a5af3c9..f7cc0171 100644 --- a/components/Blocks/TextBlock/mountProsemirror.ts +++ b/components/Blocks/TextBlock/mountProsemirror.ts @@ -153,7 +153,7 @@ export function useMountProsemirror({ nodeAt1?.marks.find((f) => f.type === schema.marks.link) || nodeAt2?.marks.find((f) => f.type === schema.marks.link); if (linkMark) { - window.open(linkMark.attrs.href, "_blank"); + window.open(linkMark.attrs.href, "_blank", "noreferrer"); return; } }, diff --git a/components/Blocks/TextBlock/schema.ts b/components/Blocks/TextBlock/schema.ts index 88b2ed91..29b39dee 100644 --- a/components/Blocks/TextBlock/schema.ts +++ b/components/Blocks/TextBlock/schema.ts @@ -105,7 +105,7 @@ let baseSchema = { ], toDOM(node) { let { href } = node.attrs; - return ["a", { href, target: "_blank" }, 0]; + return ["a", { href, target: "_blank", referrerpolicy: "no-referrer" }, 0]; }, } as MarkSpec, }, -- 2.51.2