mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Make GetUriParam work with special characters (eg. "&") (#793)
This commit is contained in:
parent
5833bb1e8f
commit
49e5eda30f
@ -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]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user