From 3d76b4dc2206c18e45a4589d3f1437af79eb7aba Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Thu, 11 Mar 2021 14:11:23 +0000 Subject: [PATCH] [Library|Trunk] fix reload issue: double encoding return 404 or error git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60626 d315682c-612b-4755-9ff5-7f18f6832af3 --- login/utils/helper.class.ts | 2 +- utils/piwik/piwik.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/login/utils/helper.class.ts b/login/utils/helper.class.ts index f2f6b0d5..10dc4b46 100644 --- a/login/utils/helper.class.ts +++ b/login/utils/helper.class.ts @@ -46,7 +46,7 @@ export class Session { } params = (params && params.split("?").length > 1) ? params.split("?")[1] : params; for (var i = 0; i < params.split("&").length; i++) { - object[(params.split("&")[i]).split("=")[0]] = (params.split("&")[i]).split("=")[1]; + object[(params.split("&")[i]).split("=")[0]] = decodeURIComponent((params.split("&")[i]).split("=")[1]); } return object; diff --git a/utils/piwik/piwik.service.ts b/utils/piwik/piwik.service.ts index b72b4453..379f5e6b 100644 --- a/utils/piwik/piwik.service.ts +++ b/utils/piwik/piwik.service.ts @@ -27,11 +27,11 @@ export class PiwikService { let referrer = this.getReferrer(); let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId); if(typeof location !== 'undefined' && piwikId){ - console.log("Piwik - View: " + pageURL, title); + // console.log("Piwik - View: " + pageURL, title); var url = properties.piwikBaseUrl+piwikId+"&rec=1&url="+StringUtils.URIEncode(pageURL)+"&action_name="+StringUtils.URIEncode(title)+ ((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+ ((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):''); - console.log("Piwik - View: " + url); + // console.log("Piwik - View: " + url); // return Observable.of(new Object()); // for testing return this.http.get( url, {responseType: 'blob'}); // .do(request => console.info("Piwik request completed" ));