Skip to content

Commit

Permalink
Update tablesort.js - security fix
Browse files Browse the repository at this point in the history
To fix DOM text is reinterpreted as HTML without escaping meta-characters. (CodeQL)
  • Loading branch information
Tontonitch authored Sep 21, 2023
1 parent 759c645 commit 81f0b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/js/tablesort.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fdTableSort = {

aclone = a.cloneNode(true);
//aclone.appendChild(document.createTextNode(thtext));
aclone.innerHTML = thtext;
aclone.innerText = thtext;
aclone.title = "Sort on \u201c" + thtext.replace('<br />', '') + "\u201d";
aclone.onclick = aclone.onkeydown = workArr[c][i].onclick = fdTableSort.initWrapper;
workArr[c][i].appendChild(aclone);
Expand Down

0 comments on commit 81f0b40

Please sign in to comment.