Skip to content

Commit

Permalink
fix(templates): potential DOM XSS
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
dwisiswant0 and coderabbitai[bot] authored Dec 13, 2024
1 parent 98646e6 commit f31e963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/server/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@
});

function toggleJSON() {
window.location.href = window.location.href + '.json';
const url = new URL(window.location.href);
url.pathname = url.pathname + '.json';
window.location.href = url.toString();
}
</script>
</body>
Expand Down

0 comments on commit f31e963

Please sign in to comment.