From 1e0deef25c7d08322c3f60966aa3c21bece3cccc Mon Sep 17 00:00:00 2001 From: Bas van den Wollenberg Date: Tue, 29 Oct 2024 02:43:09 +0100 Subject: [PATCH] Fix code scanning alert no. 1: Double escaping or unescaping Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/renderer/src/components/song/song-queue/SongQueue.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/components/song/song-queue/SongQueue.tsx b/src/renderer/src/components/song/song-queue/SongQueue.tsx index ef9a83d8..b8176375 100644 --- a/src/renderer/src/components/song/song-queue/SongQueue.tsx +++ b/src/renderer/src/components/song/song-queue/SongQueue.tsx @@ -52,7 +52,7 @@ const SongQueue: Component = () => { selected.classList.remove("selected"); } - const path = song.path.replaceAll('"', '\\"').replaceAll("\\", "\\\\"); + const path = song.path.replaceAll("\\", "\\\\").replaceAll('"', '\\"'); const element = view.querySelector(`.song-item[data-path="${path}"]`); element?.classList.add("selected");