better param parsing #36
Merged
coolaj86
merged 1 commits from params-parsing
into master
5 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'params-parsing'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Removing any and all of the following leading characters before parsing the params:
#/?
.#access_token=x&foo=bar
=>access_token=x&foo=bar
#/?access_token=x&foo=bar
=>access_token=x&foo=bar
#/access_token=x&foo=bar
=>access_token=x&foo=bar
#?access_token=x&foo=bar
=>access_token=x&foo=bar
document.body.hidden = false;
var hash = window.location.hash.substr(1);
var hash = window.location.hash.replace(/^[\/#?]+/, '');
Would #? to be safe, but I think inside a square bracket it's fine.
true on both accounts
Thanks @mikegwhit
f0049c7f06
.