Skip to content

Commit

Permalink
fix(configs): encode configs parameter value
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-max authored and mt-micky committed Apr 4, 2019
1 parent d9b576f commit 448383a
Show file tree
Hide file tree
Showing 2 changed files with 599 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class LinkSDK {
email,
auth_action: authPage
};
const params = qs.stringify({ ...this.params, configs });
const endcodedConfigs = encodeURIComponent(qs.stringify(configs));
const params = qs.stringify({ ...this.params, configs: endcodedConfigs });
window.open(`https://${this.domains.myaccount}/${OAUTH}?${params}`, newTab ? '_blank' : '_self');
}

Expand All @@ -89,7 +90,8 @@ class LinkSDK {
sdk_platform: 'js',
back_to: backTo
};
const params = qs.stringify({ ...this.params, configs });
const endcodedConfigs = encodeURIComponent(qs.stringify(configs));
const params = qs.stringify({ ...this.params, configs: endcodedConfigs });
window.open(`https://${this.domains.myaccount}?${params}/${SETTINGS}`, newTab ? '_blank' : '_self');
}
}
Expand Down
Loading

0 comments on commit 448383a

Please sign in to comment.