diff --git a/web/src/components/misc/OuterLink.svelte b/web/src/components/misc/OuterLink.svelte index 48f6f614..ac10291d 100644 --- a/web/src/components/misc/OuterLink.svelte +++ b/web/src/components/misc/OuterLink.svelte @@ -5,8 +5,17 @@ // no way to change this behavior atm (https://github.com/pngwn/MDsveX/issues/609) export let rel: string = ""; rel; + + const [ target, _rel ] = (() => { + try { + new URL(href) + return [ '_blank', 'noopener noreferrer' ]; + } catch {} + + return []; + })(); - +