Percent encoding support for URL path
See original GitHub issueSeems there is no support for percent encoding either unencoded or encoded e.g.
const Path = require('path-parser');
new Path('🦄');
Error: Could not parse path '%F0%9F%A6%84'
at tokenise (/Users/alextes/code/notepad/js/node_modules/path-parser/dist/cjs/path-parser.js:95:15)
at new Path (/Users/alextes/code/notepad/js/node_modules/path-parser/dist/cjs/path-parser.js:166:23)
Since percent encoding is allowed in URLs and common in translated routes would you appreciate a PR that supports recognizing % as part of a fragment?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Percent-encoding - Wikipedia
Percent -encoding, also known as URL encoding, is a method to encode arbitrary data in a Uniform Resource Identifier (URI) using only the...
Read more >Percent-encoding - MDN Web Docs Glossary: Definitions of ...
Percent-encoding is a mechanism to encode 8-bit characters that have specific meaning in the context of URLs. It is sometimes called URL ...
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 >HTML URL Encoding Reference - W3Schools
Character From Windows‑1252 From UTF‑8
space %20 %20
! %21 %21
" %22 %22
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So with https://github.com/router5/router5/issues/63 this got implemented for parameters. This would be about supporting it in the fragment.
Maybe good to share that you call fragment is what the RFC calls path. A little confusing as there’s also URL fragments. From the RFC:
I’d suggest updating that to match the RFC which talks about components 😁 .
If you have time, definitely 👍