mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #1430 from longsleep/fixup-getURLParameter
Fixup getURLParameter 'null' return and encoding support
This commit is contained in:
commit
d2887b76bc
1 changed files with 4 additions and 3 deletions
|
|
@ -1722,9 +1722,10 @@ function formatDate(timestamp){
|
|||
* @return {string}
|
||||
*/
|
||||
function getURLParameter(name) {
|
||||
return decodeURI(
|
||||
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1]
|
||||
);
|
||||
return decodeURIComponent(
|
||||
(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(
|
||||
location.search)||[,''])[1].replace(/\+/g, '%20')
|
||||
)||'';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue