-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Knobs: Wrong URI-encoding in torn-away iframe #11641
Comments
This change applies basic URI encoding to knob keys/values in `<iframe>` URL and torn-away window URL in preview. Fixes storybookjs#11641.
Hi @asudoh! Thanks for filing this and also for the fix. Sorry I missed this first time around, will take a look at the PR now and hopefully get it out with the next release. |
FYI, we’ve released addon-controls in Storybook 6.0. Controls are portable, auto-generated knobs that are intended to replace addon-knobs long term. Controls don't have a "populate from URL" feature yet, but we plan to add it in the future: #11604 Please upgrade and try them out today! |
Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.24 containing PR #11642 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
Describe the bug
The torn-away
<iframe>
with a knob value changed has wrong URI-encoding, not properly escaping%
character.To Reproduce
Steps to reproduce the behavior:
yarn install
yarn storybook
aria-label
knob content with10% 20% 30%
aria-label
in<span role="img">
with DOM inspectorBUG:
aria-label
shows10%%2020%%2030%
.Expected behavior
aria-label
shows10% 20% 30%
.http://localhost:6006/iframe.html?id=button--emoji&knob-aria-label=10%25%2020%25%2030%25
(aria-label
havingencodeURIComponent('10% 20% 30%')
) instead of10%%2020%%2030%
Screenshots
System:
Got below unfortunately:
But hope above provides enough info.
The text was updated successfully, but these errors were encountered: