Skip to content

Commit 877d6a3

Browse files
Potential fix for code scanning alert no. 22: Incomplete string escaping or encoding (#1663)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent cd46c0f commit 877d6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sourcefiles/js/openwebif.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ function setOSD( statusinfo )
764764
current_name = station;
765765

766766
if (station) {
767-
var stationA = station.replace(/'/g,"\\'");
767+
var stationA = station.replace(/\\/g, '\\\\').replace(/'/g,"\\'");
768768
var stream = "<div id='osdicon'>";
769769
var streamtitle = tstr_stream + ": " + station + "'><i class='fa fa-desktop'></i></a>";
770770
var streamtitletrans = tstr_stream + " (" + tstr_transcoded + "): " + station + "'><i class='fa fa-mobile'></i></a>";

0 commit comments

Comments
 (0)