Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

| gets html encoded to %7C #8

Closed
thrownblown opened this issue Oct 23, 2023 · 1 comment
Closed

| gets html encoded to %7C #8

thrownblown opened this issue Oct 23, 2023 · 1 comment

Comments

@thrownblown
Copy link

thrownblown commented Oct 23, 2023

In version 3.0.1 the cookie config below in Component.stories.tsx:

Primary.parameters = {
  // Set the viewports in Chromatic at a story level.
  layout: "fullscreen",
  chromatic: { viewports: [375, 834, 1200], delay: 3000 },
  cookie: {
    geo: "96094|WEED|CA|US",
  },
  mockData: [...

the cookie string in Storybook results:

document.cookie
'geo="96094|WEED|CA|US"'

in version 3.0.2:

document.cookie
'geo=96094%7CWEED%7CCA%7CUS'
@hwookim
Copy link
Owner

hwookim commented Oct 24, 2023

When writing and reading cookies, it is recommended to encode them via the encodeURIComponent function, so i updated that on v3.0.2.
I think it was a bad update to provide this in the library.

In version v3.0.3, I removed the logic around encoding.
Thanks for opening the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants