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

URI pieces should be URI encoded #38

Open
jhrcek opened this issue Jan 2, 2018 · 2 comments
Open

URI pieces should be URI encoded #38

jhrcek opened this issue Jan 2, 2018 · 2 comments
Labels

Comments

@jhrcek
Copy link

jhrcek commented Jan 2, 2018

Summary:
The URIs of this SPA are build just by concatenating Strings. This causes "Error Loading Page" when such a string ends up in URL.

Steps to reproduce:

  1. Register a profile with username like @#$%^&*
  2. Navigate to this user's profile by clicking the username in the top navbar.

Actual result:
URL contains unescaped characters http://rtfeldman.github.io/elm-spa-example/#/profile/@#$%^&* and page shows "Error Loading Page"

Expected behavior:
URL has escaped characters and profile page is shown correctly.

I was recently solving similar problem in my app and was looking for a "canonical solution" to this kind of issue and found this example app (which I'd expect to be "golden standard" of how to write SPAs in Elm) is also plagued by this issue. I ended up solving it by writing custom URL segment parser like this:
jhrcek/random-failures@e87b20b

@dwayne
Copy link

dwayne commented Apr 23, 2024

@jhrcek I've fixed and tested this issue in my implementation.

@jhrcek
Copy link
Author

jhrcek commented Apr 23, 2024

That's good to know. You just got yourself a star 😄

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

No branches or pull requests

3 participants