Skip to content

Commit

Permalink
update metrics page js to sanitize query parameter in metrics page URL
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeFraties committed Nov 19, 2024
1 parent a686cbc commit a4e2c92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/metrics_page.es6
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ $(document).ready(function(){
var pos1 = curUrl.lastIndexOf("?duration");
curUrl = curUrl.substring(0, pos1);
}
let duration = $( "#metrics_duration" ).val();
let duration = encodeURIComponent($("#metrics_duration").val());
let newUrl = `${curUrl}?duration=${duration}`;
debugger
window.location.href = newUrl;
});

Expand Down

0 comments on commit a4e2c92

Please sign in to comment.