Skip to content

Commit

Permalink
feat: handle xss vulnerability in js
Browse files Browse the repository at this point in the history
  • Loading branch information
NithinKuruba committed Jul 9, 2024
1 parent 33d78b4 commit 9720332
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ function addTooltips() {
var content = elem.textContent;

if (content) {
elem.innerHTML = content;
var textNode = document.createTextNode(content);
elem.innerHTML = '';
elem.appendChild(textNode);
}
}
}
Expand Down

0 comments on commit 9720332

Please sign in to comment.