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

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

Comments

@719media
Copy link

719media commented Apr 16, 2019

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

@LinusBorg LinusBorg added the bug label Apr 17, 2019
@posva posva added regression and removed bug labels Apr 17, 2019
@posva
Copy link
Member

posva commented Apr 17, 2019

I'm reverting back that change and adding some extra tests

posva added a commit that referenced this issue Apr 17, 2019
@posva posva closed this as completed in ec6eab7 Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment