From 52e85e838e7bbd7fa8860e175701303c81db9217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 4 Oct 2025 19:53:47 +0200 Subject: fix(frontend): prevent modifying internal anchors in non standard implementation --- frontend/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend') diff --git a/frontend/index.ts b/frontend/index.ts index 13997b3..ee1e7ae 100644 --- a/frontend/index.ts +++ b/frontend/index.ts @@ -2,7 +2,7 @@ import htmx from "htmx.org"; function setupAnchors() { document.querySelectorAll("a").forEach(e => { - if (!e.href.startsWith(window.location.origin)) { + if (!e.href.startsWith(window.location.origin) && /https?:\/\//.test(e.href)) { e.target = "_blank"; return } -- cgit v1.2.3