tagliatelle

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2696b9935b7fd1f3c6fc82fe2a3dba4e74f6331a
parent 1b2c102adc302382e7c4ffb36be249e5741f638c
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Thu, 30 Jul 2026 11:34:15 +0100

Fix broken thumbnails for # and ? symbols in filenames

Diffstat:
Mstatic/hover-preview.js | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/static/hover-preview.js b/static/hover-preview.js @@ -29,9 +29,10 @@ document.addEventListener('DOMContentLoaded', function () { const isVideo = VIDEO_EXTENSIONS.test(filename); if (!isImage && !isVideo) return; + const encodedFilename = encodeURIComponent(filename); const thumbUrl = isVideo - ? '/uploads/thumbnails/' + filename + '.jpg' - : '/uploads/' + filename; + ? '/uploads/thumbnails/' + encodedFilename + '.jpg' + : '/uploads/' + encodedFilename; link.addEventListener('mouseenter', function () { tooltipImg.src = thumbUrl;