From c33c85455ff38e39aa9f0725ad433118978bddb5 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Tue, 3 Feb 2026 16:19:13 -0500 Subject: [PATCH] Fix JS syntax error: escape quotes in onclick handlers for playlist names --- allstarr/wwwroot/index.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/allstarr/wwwroot/index.html b/allstarr/wwwroot/index.html index f4c5ff6..a479a3f 100644 --- a/allstarr/wwwroot/index.html +++ b/allstarr/wwwroot/index.html @@ -1002,8 +1002,8 @@ ${p.trackCount || 0} ${p.cacheAge || '-'} - - + + `).join(''); @@ -1104,8 +1104,8 @@ : 'Not Linked'; const actionButton = p.isConfigured - ? `` - : ``; + ? `` + : ``; const localCount = p.localTracks || 0; const externalCount = p.externalTracks || 0; @@ -1448,6 +1448,11 @@ return div.innerHTML; } + function escapeJs(text) { + if (!text) return ''; + return text.replace(/\\/g, '\\\\').replace(/'/g, "\\'").replace(/"/g, '\\"'); + } + // Initial load fetchStatus(); fetchPlaylists();