Skip to content

URL query parameters getting encoded twice #378

@decademoon

Description

@decademoon

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions