From df624752193af34f618704c02d4fe2f158939aba Mon Sep 17 00:00:00 2001 From: Zbynek Konecny Date: Thu, 12 Dec 2024 14:10:34 +0100 Subject: [PATCH] Fix links for new page creation --- ui-bundle/partials/footer-scripts.hbs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui-bundle/partials/footer-scripts.hbs b/ui-bundle/partials/footer-scripts.hbs index 4ef8761..b45e899 100644 --- a/ui-bundle/partials/footer-scripts.hbs +++ b/ui-bundle/partials/footer-scripts.hbs @@ -36,7 +36,9 @@ MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () { .then(rsp=>rsp.text()) .then(text=> { document.querySelectorAll('.newlink').forEach(link => { - link.href += "?value=" + encodeURIComponent(text); + const url = new URL(link.href); + url.searchParams.set("value", text) + link.href = url.toString(); link.style.display = ''; }) });