home · contact · privacy
Fix broken tag links in file view. master
authorChristian Heller <c.heller@plomlompom.de>
Thu, 20 Feb 2025 15:20:30 +0000 (16:20 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 20 Feb 2025 15:20:30 +0000 (16:20 +0100)
src/templates/file_data.tmpl

index 0ea51668ebf12be62b5436fe6bd795220859cf19..c8495413cb0a655dcf196acdbf2bc6a186c26c3a 100644 (file)
@@ -19,7 +19,7 @@ async function update_file_data() {
         {% if not allow_edit %}input.disabled = true;{% endif %}
         input.onclick = send_update;
         const a = new_child_to("a", new_child_to("td", new_child_to("td", tr)));
-        a.href = "/{{page_names.files}}?needed_tag={{tag|urlencode}}";
+        a.href = `${PATH_FILES}?needed_tag=${encodeURIComponent(tag)}`;
         a.textContent = tag;
     });
     document.getElementById("added_tag").value = "";