Vue-router: URL query parameters getting encoded twice

Created on 21 Feb 2016  路  1Comment  路  Source: vuejs/vue-router

If I perform this:

this.$router.go({ name: 'a', query: { b: '/c' } })

then the URL in the address bar becomes /a?b=%252Fc instead of /a?b=%2Fc.

this.$route.query.b will be '%2Fc' instead of '/c'.


It seems that each query parameter is being encodeURIComponent-ed, combined into the full path, then the full path is encodeURI-ed. Shouldn't the URL be encodeURI-ed before the query string is appended?

bug

Most helpful comment

Do you have any idea when it will be integrated on the npm registry ?

>All comments

Do you have any idea when it will be integrated on the npm registry ?

Was this page helpful?
0 / 5 - 0 ratings