Skip to content

Commit ecd91c0

Browse files
committed
dashboard: use URLSearchParams instead of our own query arg parser
that did not decode URL escapes like %5E, making it impossible to put a ^ in the filter.
1 parent a30ed2b commit ecd91c0

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

dashboard/assets/scripts/dashboard.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,6 @@ function regExpEscape(s) {
122122
return escaped;
123123
}
124124

125-
function getQueryArgs() {
126-
const pairs = location.search.replace("?", "").split("&");
127-
if (pairs === "") {
128-
return {};
129-
}
130-
return Object.fromEntries(pairs.map((e) => split(e, "=", 1)));
131-
}
132-
133125
function addAnyChangeListener(elem, func) {
134126
// DOM0 handler for convenient use by Clear button
135127
elem.onchange = func;
@@ -998,7 +990,7 @@ class Dashboard {
998990
this.newItemsReceived = 0;
999991
this.newBytesReceived = 0;
1000992

1001-
const args = getQueryArgs();
993+
const args = Object.fromEntries(new URLSearchParams(window.location.search));
1002994

1003995
const historyLines = args.historyLines ? Number(args.historyLines) : navigator.userAgent.match(/Mobi/) ? 250 : 500;
1004996
const batchTimeWhenVisible = args.batchTimeWhenVisible ? Number(args.batchTimeWhenVisible) : 125;

0 commit comments

Comments
 (0)