From 5d9770204897cfb70c8966a657188c4a594656b2 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 16 Oct 2023 22:00:25 -0400 Subject: [PATCH] fix: ensure proper slashes --- src/backend/filters/urlRewrite.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/filters/urlRewrite.ts b/src/backend/filters/urlRewrite.ts index 529c117..d29819b 100644 --- a/src/backend/filters/urlRewrite.ts +++ b/src/backend/filters/urlRewrite.ts @@ -26,6 +26,9 @@ export default class URLRewriteFilter implements ContentFilter { urlValue.startsWith("../") || urlValue.startsWith("http") ) { + if (!urlValue.startsWith("/")) { + urlValue = `/${urlValue}`; + } $(element).attr(attrName, `/browse${urlValue}`); } }