Skip to content

Commit

Permalink
Fix location.hash when there are multiple '%'.
Browse files Browse the repository at this point in the history
This fix is suggested by CodeQL.
  • Loading branch information
taoky committed Sep 1, 2023
1 parent 2856a1a commit d0840c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/templates/hub.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h1>{{ opened.name }}</h1>
// take care of encoding Unicode characters.
// To decode this:
// decodeURIComponent(location.hash.slice(1))
location.hash = '#' + challenge.name.replace('%', '%25');
location.hash = '#' + challenge.name.replaceAll('%', '%25');
},
category_color(category) {
let random = new Math.seedrandom(category);
Expand Down

0 comments on commit d0840c4

Please sign in to comment.