Skip to content

vue-router 3.0.5 incorrectly encodes route on async load (but works fine on 3.0.4) #2719

Closed
@719media

Description

Version

3.0.5

Reproduction link

https://codesandbox.io/s/1znn98wx47

Steps to reproduce

https://codesandbox.io/s/1znn98wx47
Follow instructions by navigating to ComponentB by clicking on the link. If you don't immediately see the problem, then click the refresh icon to simulate reloading assets/page (because the componentB must async load and not already be stored in cache).

Notice that the route path is now URL encoded.

What is expected?

Route path should not be URL encoded. In most browsers, the URL address bar up top will actually also change the URL as well to this encoded version, which obviously is unsightly for people who care about a clean URL

What is actually happening?

Route path is URL encoded. This has the unfortunate side effect of changing the URL bar in chrome. If you visit domain.com/a/b/c it will change to domain.com/a%2Fb%2Fc which is undesirable.


This works fine in 3.0.4. The regression is due to this line change

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions