slashes should not be encoded for catch all regexes #1638
Open
Description
Version
4.1.6
Reproduction link
Steps to reproduce
- Load the codesandbox.io project using the link provided.
- Click on About page.
- Click on the "Add hash" button, this will call
router.replace({ hash: '#something' })
. - Notice that vue-router correctly appends the # in the url.
(https://domain.com/about.html#yippy)
. - Click on Deep About page.
- Click on the "Add hash" button.
- Notice that the url becomes
https://domain.com/test%2Fdeep%2Fabout.html#yaya
.
What is expected?
Url to become https://domain.com/test/deep/about.html#yaya
What is actually happening?
Url became https://domain.com/test%2Fdeep%2Fabout.html#yaya
This is for the front-end of a CMS-supported project, where the front part of the URL is controlled by the CMS and it varies depending on the environment. Hence the need to first match it using :pathMatch()
then match the actual page to render using :pageName()
.
Also, all pages has to be suffixed with .html, hence I am using a (kind of) complex regex to match the page. It works, however, I stumble upon this issue.
Metadata
Assignees
Labels
Type
Projects
Status
📆 Planned