URI pieces should be URI encoded
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:
- Register a profile with username like
@#$%^&* - 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: https://github.com/jhrcek/random-failures/commit/e87b20b8e8d3795349758cd66912a9ad091bcd9c
That's good to know. You just got yourself a star :smile: