Skip to content

Commit 4fdba22

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

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
@@ -771,7 +771,7 @@ function setOSD( statusinfo )
771771
var _osdch = "<span class='osdch'>" + station + "</span></a>&nbsp;&nbsp;";
772772
var _beginend = _osdch + statusinfo.currservice_begin + " - " + statusinfo.currservice_end + "&nbsp;&nbsp;";
773773
var desc = statusinfo.currservice_fulldescription;
774-
desc = desc.replace(/'/g,"\\'");
774+
desc = desc.replace(/\\/g, '\\\\').replace(/'/g,"\\'");
775775

776776
if ((sref.indexOf("1:0:1") !== -1) || (sref.indexOf("1:134:1") !== -1)) {
777777
if (statusinfo.transcoding) {

0 commit comments

Comments
 (0)