Require certain characters to be URL-encoded
See original GitHub issueDescribe the problem
With the addition of named layouts (#4388), the @ symbol takes on a special meaning in route filenames, alongside [, ] and __. If app authors wish to use these characters in their routes, they should URL-encode them.
We might need to add more such characters in future, and it would be nice if doing so wasn’t a breaking change. For example, we haven’t figured out how we’re going to go about localising routes yet, but perhaps we’ll decide we want to do this:
src/routes/translate(about).svelte
In order to reserve that possibility, we should insist that parentheses in route filenames are encoded:
src/routes/Street Spirit %28Fade Out%29
Describe the proposed solution
a) figure out which characters we want to reserve, and reserve them b) document it (we should do this regardless, for the characters already claimed)
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (5 by maintainers)

Top Related StackOverflow Question
I think we can close this post-#5748, since routing is now handled entirely by directories meaning that there’s less likelihood of conflicts between filename punctuation and routes. I’m confident that we can implement whatever new features we’d want to (e.g. a localisation group) using
[]and(), which would be non-breaking.see #5029 / #5056