From 412a77b7c1ba1819f4bf1c0697ddd19d7af21e19 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Mon, 6 Oct 2025 19:15:43 +0200 Subject: fix(frontend): malformed title and quote after hot update --- frontend/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend') diff --git a/frontend/index.ts b/frontend/index.ts index 1d87f0a..a00854f 100644 --- a/frontend/index.ts +++ b/frontend/index.ts @@ -21,10 +21,10 @@ function setupAnchors() { document.addEventListener("htmx:afterSettle", e => { if (e.detail.xhr === undefined) return const title = e.detail.xhr.getResponseHeader("Updated-Title") - if (title?.length !== 0) document.title = title + if (title?.length !== 0) document.title = decodeURIComponent(title).replaceAll("+", " ") const quote = e.detail.xhr.getResponseHeader("Updated-Quote") if (quote?.length !== 0) - document.querySelector("#quote")!.innerHTML = "« " + quote + " »" + document.querySelector("#quote")!.innerHTML = "« " + decodeURIComponent(quote).replaceAll("+", " ") + " »" setupAnchors() }) -- cgit v1.2.3