Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Unicode characters in routes are mishandled #184

Closed
ghost opened this issue Apr 25, 2018 · 4 comments
Closed

Unicode characters in routes are mishandled #184

ghost opened this issue Apr 25, 2018 · 4 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Apr 25, 2018

The current version mistreats Unicode characters in route URLs, no matter if they're being escaped or not. Those routes appear to be rendered correctly, though they are saved under their escaped names.¹

Example: if routes is ["tést"], then that route will be saved in a directory named t%C3%A9st, although it should have been saved under tést. While it is true that browsers will request t%C3%A9st, a web server will unescape this string and look for tést, which it can not find.

This issue probably affects some ASCII characters, too; namely those that the file system may use, but URLs must not.

¹ Nit: URLs are not allowed to contain non-ASCII characters in the first place. The real issue here is that filenames are still escaped in the file system context.

@ghost
Copy link
Author

ghost commented Apr 25, 2018

(Consequently, if routes is ["t%C3%A9st"], the directory that's created must be named tést as well.)

@JoshTheDerf JoshTheDerf self-assigned this Apr 25, 2018
@JoshTheDerf
Copy link
Collaborator

Should be fixed in v3.1.0. :)

@ghost
Copy link
Author

ghost commented Apr 25, 2018

Yep, looks like it's working now. Awesome, thanks for fixing this so quickly! 👍

@JoshTheDerf
Copy link
Collaborator

Hooray. :D

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant