Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #191: Add encodeURI option to allow skipping encodeURI for custom paths #199

Merged
merged 2 commits into from
Jan 24, 2019

Conversation

michaelwnyc
Copy link

When a custom path has regular expression inside, encodeURI will escape special characters. /foo/:slug-:id(\\d+) will becomes /foo/:slug-:id(%5Cd+).

This PR adds encodeURI option per the suggestion in #191. If it's set to false, then custom paths will not be encoded through encodeURI method. Since no encoding will happen, the user will need to ensure the correctly encoded paths are specified.

@paulgv paulgv merged commit 00c89f1 into nuxt-modules:master Jan 24, 2019
@paulgv
Copy link
Collaborator

paulgv commented Jan 24, 2019

Awesome! Thanks a lot @michaelize !

@paulgv
Copy link
Collaborator

paulgv commented Jan 24, 2019

Renaming the option to encodePaths to prevent conflicts with encodeURI method.

@michaelwnyc michaelwnyc deleted the add-option-for-encodeURI branch January 24, 2019 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants