From ec70fbe94e851133ee313e47e61df1d6ec421364 Mon Sep 17 00:00:00 2001 From: kueken Date: Mon, 21 Jul 2025 17:38:51 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 22: Incomplete string escaping or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- sourcefiles/js/openwebif.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sourcefiles/js/openwebif.js b/sourcefiles/js/openwebif.js index 658b251d7..35199c0e6 100644 --- a/sourcefiles/js/openwebif.js +++ b/sourcefiles/js/openwebif.js @@ -764,7 +764,7 @@ function setOSD( statusinfo ) current_name = station; if (station) { - var stationA = station.replace(/'/g,"\\'"); + var stationA = station.replace(/\\/g, '\\\\').replace(/'/g,"\\'"); var stream = "
"; var streamtitle = tstr_stream + ": " + station + "'>"; var streamtitletrans = tstr_stream + " (" + tstr_transcoded + "): " + station + "'>";