2
0

fix(lib): 🐛 Encode hidden variables properly

This commit is contained in:
Baptiste Arnaud
2022-03-25 11:15:24 +01:00
parent 9fe85cd913
commit 2ae326c102
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "typebot-js", "name": "typebot-js",
"version": "2.2.1", "version": "2.2.2",
"main": "dist/index.js", "main": "dist/index.js",
"unpkg": "dist/index.umd.min.js", "unpkg": "dist/index.umd.min.js",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",

View File

@ -37,7 +37,10 @@ const parseStarterVariables = (starterVariables?: {
starterVariables starterVariables
? `&${Object.keys(starterVariables) ? `&${Object.keys(starterVariables)
.filter((key) => starterVariables[key]) .filter((key) => starterVariables[key])
.map((key) => `${key}=${starterVariables[key]}`) .map(
(key) =>
`${key}=${encodeURIComponent(starterVariables[key] as string)}`
)
.join('&')}` .join('&')}`
: '' : ''