From 35004c167517eef3a837de1075f7466cea963c5d Mon Sep 17 00:00:00 2001 From: John Berlin Date: Sat, 26 Oct 2019 04:25:14 -0400 Subject: [PATCH] Fixed calendar view dropping query parameters by using encodeURIComponent fixes #510 (#512) --- pywb/static/query.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pywb/static/query.js b/pywb/static/query.js index d78cda40..55ab8443 100644 --- a/pywb/static/query.js +++ b/pywb/static/query.js @@ -212,7 +212,12 @@ RenderCalendar.prototype.makeCDXQueryURL = function() { if (this.queryInfo.rawSearch) { queryURL = this.cdxURL + this.queryInfo.rawSearch + '&output=json'; } else { - queryURL = this.cdxURL + '?output=json&url=' + this.queryInfo.url; + queryURL = + this.cdxURL + + '?output=json&url=' + + // ensure that any query params in the search URL are not considered + // apart of the full query URL + encodeURIComponent(this.queryInfo.url); } var querySearchParams = this.queryInfo.searchParams; if (querySearchParams.present && querySearchParams.includeInURL) {