From c2133771eb36a09441a8a798031643d8c72e0e00 Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 6 Aug 2022 01:12:47 +0200 Subject: [PATCH] URL encode item ID in edit link --- static/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/index.js b/static/index.js index a13bf62..2d7b1aa 100644 --- a/static/index.js +++ b/static/index.js @@ -29,7 +29,7 @@ function renderItems() { clone.querySelector(".content").textContent = item.content; clone.querySelector(".note").textContent = item.note; clone.querySelector(".result").id = `item-${id}`; - clone.querySelector("a").href = `form.html?id=${id}`; + clone.querySelector("a").href = `form.html?id=${encodeURIComponent(id)}`; if (item.hidden) { clone.querySelector(".result").classList.add('hidden') };