Skip to content

Commit

Permalink
Merge pull request #34 from IanSkelskey/alert-autofix-12
Browse files Browse the repository at this point in the history
Potential fix for code scanning alert no. 12: DOM text reinterpreted as HTML
  • Loading branch information
IanSkelskey authored Feb 23, 2025
2 parents fb966f5 + cf98e48 commit 50ef0e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Open-ILS/src/extras/opensearchportal.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@
if (cur_src.childNodes[i].nodeValue == turi)
return;
}
cur_src.innerHTML += '<a name="' + single_source + '" href="' + turi + '">' + turi + '</a><br>';
var a = document.createElement('a');
a.name = single_source;
a.href = turi;
a.textContent = turi;
cur_src.appendChild(a);
cur_src.appendChild(document.createElement('br'));
perform_search(single_source);
return;
}
Expand Down

0 comments on commit 50ef0e4

Please sign in to comment.