From 28de049d5cfe6a0b476711c8073a9ffc1e5845d7 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 13 Nov 2020 11:41:56 +0100 Subject: [PATCH] docs: update query encoding --- docs/guide/migration/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guide/migration/index.md b/docs/guide/migration/index.md index b9a11014..793a5f17 100644 --- a/docs/guide/migration/index.md +++ b/docs/guide/migration/index.md @@ -387,7 +387,6 @@ Given any [normalized route location](/api/#routelocationnormalized): - `hash` is now decoded, that way it can be copied over: `router.push({ hash: $route.hash })` and be used directly in [scrollBehavior](/api/#scrollbehavior)'s `el` option. - When using `push`, `resolve`, and `replace` and providing a `string` location or a `path` property in an object, **it must be encoded** (like in the previous version). On the other hand, `params`, `query` and `hash` must be provided in its unencoded version. - The slash character (`/`) is now properly decoded inside `params` while still producing an encoded version on the URL: `%2F`. -- The `+` character (`%2B` in its encoded form) no longer receives special treatment when found on the query section of the URL. It used to be encoded to deal with [legacy systems using `application/x-www-form-urlencoded`](https://url.spec.whatwg.org/#urlencoded-parsing). This can still be customized when providing custom [parsing and stringifying for `query`](/api/#stringifyquery) because they are responsible of encoding and decoding query params. **Reason**: This allows to easily copy existing properties of a location when calling `router.push()` and `router.resolve()`, and make the resulting route location consistent across browsers. `router.push()` is now idempotent, meaning that calling `router.push(route.fullPath)`, `router.push({ hash: route.hash })`, `router.push({ query: route.query })`, and `router.push({ params: route.params })` will not create extra encoding. -- 2.39.5