diff --git a/packages/typebot-js/package.json b/packages/typebot-js/package.json index 18ef93a2c..bdaa41071 100644 --- a/packages/typebot-js/package.json +++ b/packages/typebot-js/package.json @@ -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", diff --git a/packages/typebot-js/src/iframe/index.ts b/packages/typebot-js/src/iframe/index.ts index 7c1b662dd..1c232160d 100644 --- a/packages/typebot-js/src/iframe/index.ts +++ b/packages/typebot-js/src/iframe/index.ts @@ -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('&')}` : ''