Skip to content

Commit

Permalink
Merge pull request #30 from incpi/autofix/alert-10-1e36c1e545
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 10: DOM text reinterpreted as HTML
  • Loading branch information
Incpi authored Sep 24, 2024
2 parents bb489ee + da664ce commit 96e5047
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $(document).ready(function () {
header.prop("tagName").toLowerCase()
);
const link = $("<a></a>")
.attr("href", "#" + id)
.attr("href", "#" + encodeURIComponent(id))
.text(header.text());
link.on("click", function (event) {
event.preventDefault();
Expand Down

0 comments on commit 96e5047

Please sign in to comment.