From 25d3283a80c87dcd054e50bba3aa2f4e2f5178ea Mon Sep 17 00:00:00 2001 From: OFF0 Date: Wed, 16 Aug 2023 18:23:09 +0200 Subject: [PATCH] routes: fix internal link detection it just checked link length, but should at least ensure that the condition which checks for internal links starts with a slash. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 47b13ba..aa2a068 100644 --- a/src/main.ts +++ b/src/main.ts @@ -317,7 +317,7 @@ const handleLink = (a: HTMLAnchorElement, e: MouseEvent) => { || href.startsWith('/feed') || href.startsWith('/note') || href.startsWith('/npub') - || href.length === 65 + || (href.startsWith('/') && href.length === 65) ) { route(href); history.pushState({}, '', href);