From 49e5eda30f0641eafb1ae2f368ea07ed35de2672 Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Thu, 23 Apr 2020 20:48:48 +0200 Subject: [PATCH] Make GetUriParam work with special characters (eg. "&") (#793) --- public/js/extensions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/extensions.js b/public/js/extensions.js index e8f5b1c8..ad580f00 100644 --- a/public/js/extensions.js +++ b/public/js/extensions.js @@ -23,7 +23,7 @@ String.prototype.replaceAll = function(search, replacement) GetUriParam = function(key) { - var currentUri = decodeURIComponent(window.location.search.substring(1)); + var currentUri = window.location.search.substring(1); var vars = currentUri.split('&'); for (i = 0; i < vars.length; i++) @@ -32,7 +32,7 @@ GetUriParam = function(key) if (currentParam[0] === key) { - return currentParam[1] === undefined ? true : currentParam[1]; + return currentParam[1] === undefined ? true : decodeURIComponent(currentParam[1]); } } };