Skip to content

Commit

Permalink
fix(lib): 🐛 Encode hidden variables properly
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Mar 25, 2022
1 parent 9fe85cd commit 2ae326c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/typebot-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typebot-js",
"version": "2.2.1",
"version": "2.2.2",
"main": "dist/index.js",
"unpkg": "dist/index.umd.min.js",
"license": "AGPL-3.0-or-later",
Expand Down
5 changes: 4 additions & 1 deletion packages/typebot-js/src/iframe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ const parseStarterVariables = (starterVariables?: {
starterVariables
? `&${Object.keys(starterVariables)
.filter((key) => starterVariables[key])
.map((key) => `${key}=${starterVariables[key]}`)
.map(
(key) =>
`${key}=${encodeURIComponent(starterVariables[key] as string)}`
)
.join('&')}`
: ''

Expand Down

0 comments on commit 2ae326c

Please sign in to comment.