From a934397961f15ee0e07a43125e20bd26f7125be6 Mon Sep 17 00:00:00 2001
From: Anton Bulakh <him@necauq.ua>
Date: Tue, 31 Dec 2024 02:21:07 +0000
Subject: [PATCH] fix(spa): Fix relative alias redirects (#1688)
---
quartz/util/path.ts | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/quartz/util/path.ts b/quartz/util/path.ts
index c02bfb1..a6a05f9 100644
--- a/quartz/util/path.ts
+++ b/quartz/util/path.ts
@@ -108,10 +108,10 @@
el.setAttribute(attr, rebased.pathname + rebased.hash)
}
export function normalizeRelativeURLs(el: Element | Document, destination: string | URL) {
- el.querySelectorAll('[href^="./"], [href^="../"]').forEach((item) =>
+ el.querySelectorAll('[href=""], [href^="./"], [href^="../"]').forEach((item) =>
_rebaseHtmlElement(item, "href", destination),
)
- el.querySelectorAll('[src^="./"], [src^="../"]').forEach((item) =>
+ el.querySelectorAll('[src=""], [src^="./"], [src^="../"]').forEach((item) =>
_rebaseHtmlElement(item, "src", destination),
)
}
--
Gitblit v1.10.0