Skip to content

Commit

Permalink
Try encodeURIComponent()
Browse files Browse the repository at this point in the history
  • Loading branch information
lyricnz committed Mar 16, 2024
1 parent 4112399 commit 28ded65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
// add onchange event to option to change the URL
$("select#region").on("change", function() {
var region = $(this).find(":selected").text();
var url = window.location.protocol + "//" + window.location.host + window.location.pathname + '?region=' + region;
var url = window.location.protocol + "//" + window.location.host + window.location.pathname + '?region=' + encodeURIComponent(region);
$(location).attr('href', url);
})
</script>
Expand Down

0 comments on commit 28ded65

Please sign in to comment.