diff --git a/layouts/html.hbs b/layouts/html.hbs index 3563474eb..9de2a85b0 100644 --- a/layouts/html.hbs +++ b/layouts/html.hbs @@ -115,12 +115,11 @@ <script> {{#babel}} function iframeGetSearchParams() { - let params = new URLSearchParams(window.location.search); - let verticalUrl = window.location.pathname.substr(1) - if (verticalUrl) { - params.set('verticalUrl', verticalUrl); - } - return params.toString(); + const params = window.location.search.substr(1); + const verticalUrl = window.location.pathname.substr(1); + return verticalUrl + ? params + '&verticalUrl=' + verticalUrl + : params; } let iframeLoadedResolve; window.iframeLoaded = new Promise(resolve => { diff --git a/static/js/iframe-common.js b/static/js/iframe-common.js index 6bf3ff8dc..dbaf4d408 100644 --- a/static/js/iframe-common.js +++ b/static/js/iframe-common.js @@ -15,9 +15,6 @@ export function generateIFrame(domain, queryParam, urlParam) { var paramString = window.location.search; paramString = paramString.substr(1, paramString.length); - // Decode ASCII forward slash to avod repeat encodings on page refreshes - paramString = paramString.replace("%2F", "/"); - // Parse the params out of the URL var params = paramString.split('&'), verticalUrl;