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

URL params should be decoded #107

Closed
jesseskinner opened this issue Apr 17, 2020 · 7 comments · Fixed by #135
Closed

URL params should be decoded #107

jesseskinner opened this issue Apr 17, 2020 · 7 comments · Fixed by #135
Labels
breaking-change Changes that require a major version bump as per semver bug Something isn't working ready Change implemented in a dev branch
Milestone

Comments

@jesseskinner
Copy link

If I have a route like #/path/:param and my URL is #/path/My%20Param, I would expect the param value to be "My Param" but it ends up as "My%20Param", forcing me to run decodeURIComponent on each value.

Is this expected behaviour, or a bug in svelte-spa-router?

@ItalyPaleAle
Copy link
Owner

I have noticed it myself in a couple of apps I built.

I would say it was not an intentional behavior, but in the apps I built I've fixed it in the application code.

At this stage, however, I wonder if a fix for this in the router would have to be considered a breaking one, so something that would require a version 3.

@frederikhors
Copy link
Contributor

frederikhors commented Apr 17, 2020

Version 3 with my beloved #105 and #105! 😄 😄 😄

UPDATE

I meant #105 and #104.

@frederikhors
Copy link
Contributor

Can we create a project here: https://github.com/ItalyPaleAle/svelte-spa-router/projects?

@ItalyPaleAle
Copy link
Owner

Let's discuss #105 separately... As i mentioned in that issue, I am waiting for changes upstream (and I still think they should fix it upstream first). While both are breaking changes, the impact is stunningly different.

@ItalyPaleAle ItalyPaleAle added this to the v3.0 milestone Apr 18, 2020
@ItalyPaleAle ItalyPaleAle added the breaking-change Changes that require a major version bump as per semver label Apr 18, 2020
@ItalyPaleAle
Copy link
Owner

@jesseskinner Thinking more about it, this makes sense. I've accepted this and will implement it for 3.0.
Thanks for the suggestion!

ItalyPaleAle added a commit that referenced this issue Apr 18, 2020
@ItalyPaleAle
Copy link
Owner

Fixed in branch v3.0-wip. Will be merged to master when I'm ready to release 3.0

@jesseskinner
Copy link
Author

@ItalyPaleAle that's great, thanks!

@ItalyPaleAle ItalyPaleAle added ready Change implemented in a dev branch bug Something isn't working labels Sep 6, 2020
@ItalyPaleAle ItalyPaleAle mentioned this issue Sep 19, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes that require a major version bump as per semver bug Something isn't working ready Change implemented in a dev branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants