question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Require certain characters to be URL-encoded

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Rich-Harriscommented, Aug 25, 2022

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.

0reactions
rdelacommented, Jul 15, 2022

see #5029 / #5056

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML URL Encoded Characters Reference - freeCodeCamp
There are only certain characters that are allowed in the URL string, alphabetic characters, numerals, and a few characters ; , / ?...
Read more >
What is URL Encoding and How does it work? | URLEncoder
Decimal Character URL Encoding (UTF‑8) 0 NUL(null character) %00 1 SOH(start of header) %01 2 STX(start of text) %02
Read more >
HTML URL Encoding Reference - W3Schools
Character From Windows‑1252 From UTF‑8 space %20 %20 ! %21 %21 " %22 %22
Read more >
URL Encoding | Google Maps Platform
All characters to be URL-encoded are encoded using a '%' character and a two-character hex value corresponding to their UTF-8 character. For example,...
Read more >
URL Encoding of Special Characters - N-able
No information is available for this page.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found