Skip to content

Percent encoding support for URL path #12

@alextes

Description

@alextes

Seems 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions