better param parsing #36

Yhdistetty
coolaj86 yhdistetty 1 committia lähteestä params-parsing kohteeseen master 2019-05-29 21:38:17 +00:00
Omistaja

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
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`
Ghost hyväksyi nämä muutokset 2019-05-29 01:49:48 +00:00
@ -4,3 +4,3 @@
document.body.hidden = false;
var hash = window.location.hash.substr(1);
var hash = window.location.hash.replace(/^[\/#?]+/, '');
First-time contributor

Would #? to be safe, but I think inside a square bracket it's fine.

Would \#\? to be safe, but I think inside a square bracket it's fine.
Tekijä
Omistaja

true on both accounts

true on both accounts
coolaj86 closed this pull request 2019-05-29 21:38:17 +00:00
Tekijä
Omistaja

Thanks @mikegwhit

Thanks @mikegwhit
Sign in to join this conversation.
No reviewers
Ei tunnistetta
feature
Ei merkkipaalua
Ei käsittelijää
2 osallistujaa
Ilmoitukset
Määräpäivä
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

Määräpäivää ei asetettu.

Riippuvuudet

Riippuvuuksia ei asetettu.

Reference: coolaj86/telebit.js#36
No description provided.