8000 decode URI when aborting transition (Fix #760) by LinusBorg · Pull Request #1020 · vuejs/vue-router · GitHub
[go: up one dir, main page]

Skip to content

Conversation

LinusBorg
Copy link
Member

(Fixes #760)

Problem

When aborting a transition, and the URL contained escaped chars, the chars would be escaped again. I added a decode in between to make this work again.

@LinusBorg LinusBorg added the 1.x label Dec 19, 2016
@BreakingDev
Copy link

Any idea when this will be merged? @dfmelicor

@@ -45,7 +46,8 @@ export default class RouteTransition {
// on initial load, it gets caught in an infinite loop.
const abortingOnLoad = !this.from.path && this.to.path === '/'
if (!abortingOnLoad) {
this.router.replace(this.from.path || '/')
const path = this.from.path ? tryDecode(this.from.path, true) : '/'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a little comment over here to point out why we need to call tryDecode?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@posva posva requested a review from fnlctrl January 15, 2017 19:00
@yyx990803 yyx990803 merged commit efadecc into vuejs:1.0 Jan 16, 2017
@LinusBorg LinusBorg deleted the v1_fix_abort_URI_decode_(fix#760) branch February 14, 2017 16:17
@LinusBorg LinusBorg restored the v1_fix_abort_URI_decode_(fix#760) branch February 14, 2017 16:17
@LinusBorg LinusBorg deleted the v1_fix_abort_URI_decode_(fix#760) branch February 14, 2017 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0