-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
fix: only encode non dynamic path params #8421
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #8421 +/- ##
==========================================
- Coverage 68.26% 68.07% -0.20%
==========================================
Files 91 91
Lines 3901 3912 +11
Branches 1065 1069 +4
==========================================
Hits 2663 2663
- Misses 1004 1012 +8
- Partials 234 237 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
We just encountered a similar bug in our @domainr website frontend. We have tests that caught a URI-encoded param in a route. Previously, a |
What about routes like this one: https://github.com/vuejs/vue-router/blob/2c757a1cdc3aa8d55c3e3e22788a89f2351e58a0/examples/route-matching/app.js#L24 From a quick look at the code, it seems like it encodes all routes that are non-dynamic but routes can be non-dynamic and contain regexp which will break when encoded. |
@rchl Kindly please use a reproduction/issue. Last change only tries to encode auto scanned directories ( |
Sounds good. Was just pointing out a potential issue without looking much at the code as I don't have time to dig into it now. |
Types of changes
Description
Only encode non dynamic route paths. Resolves #8420
Context: #8325 (with this PR, custom router is responsible to encode routes)
Checklist: