mirror of
https://github.com/grocy/grocy.git
synced 2025-08-16 10:44:37 +00:00
Make GetUriParam work with special characters (eg. "&") (#793)
This commit is contained in:
@@ -23,7 +23,7 @@ String.prototype.replaceAll = function(search, replacement)
|
|||||||
|
|
||||||
GetUriParam = function(key)
|
GetUriParam = function(key)
|
||||||
{
|
{
|
||||||
var currentUri = decodeURIComponent(window.location.search.substring(1));
|
var currentUri = window.location.search.substring(1);
|
||||||
var vars = currentUri.split('&');
|
var vars = currentUri.split('&');
|
||||||
|
|
||||||
for (i = 0; i < vars.length; i++)
|
for (i = 0; i < vars.length; i++)
|
||||||
@@ -32,7 +32,7 @@ GetUriParam = function(key)
|
|||||||
|
|
||||||
if (currentParam[0] === key)
|
if (currentParam[0] === key)
|
||||||
{
|
{
|
||||||
return currentParam[1] === undefined ? true : currentParam[1];
|
return currentParam[1] === undefined ? true : decodeURIComponent(currentParam[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user