angular-docs-cn/packages/router/test
Jason Aden fa974c7d4e fix(router): fix URL serialization so special characters are only encoded where needed (#22337)
This change brings Angular largely in line with how AngularJS previously serialized URLs. This is based on RFC 3986 and resolves issues such as the above #10280 where URLs could be parsed, re-serialized, then parsed again producing a different result on the second parsing.

Adjustments to be aware of in this commit:

* URI fragments will now serialize the same as query strings
* In the URI path or segments (portion prior to query string and/or fragment), the plus sign (`+`) and ampersand (`&`) will appear decoded
* In the URL path or segments, parentheses values (`(` and `)`) will now appear percent encoded as `%28` and `%29` respectively
* In the URL path or segments, semicolons will be encoded in their percent encoding `%3B`

NOTE: Parentheses and semicolons denoting auxillary routes or matrix params will still appear in their decoded form -- only parentheses and semicolons used as values in a segment or key/value pair for matrix params will be encoded.

While these changes are not considered breaking because applications should be decoding URLs and key/value pairs, it is possible that some unit tests will break if comparing hard-coded URLs in tests since that hard coded string will represent the old encoding. Therefore we are releasing this fix in the upcoming Angular v6 rather than adding it to a patch for v5.

Fixes: #10280

PR Close #22337
2018-03-06 06:58:08 -08:00
..
utils build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
BUILD.bazel build: Remove angular_src nested workspace (#21096) 2018-01-19 10:17:37 -08:00
apply_redirects.spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
bootstrap.spec.ts build(router): enable bazel tests for router (#21053) 2017-12-22 13:10:51 -08:00
config.spec.ts refactor(router): compile router cleanly with TypeScript 2.4 (#18465) 2017-08-02 17:32:02 -07:00
create_router_state.spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
create_url_tree.spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
helpers.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
integration.spec.ts feat(core): set preserveWhitespaces to false by default (#22046) 2018-02-16 09:06:14 -08:00
recognize.spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
regression_integration.spec.ts fix(router): RouterLinkActive should update its state right after checking the children (#19449) 2017-10-18 11:17:55 -07:00
router.spec.ts fix(router): don't mutate route configs (#22358) 2018-02-22 13:35:38 -08:00
router_preloader.spec.ts fix(router): don't mutate route configs (#22358) 2018-02-22 13:35:38 -08:00
router_state.spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
shared.spec.ts feat(router): add `ParamMap.keys` to get a list of parameters 2017-03-20 09:19:32 -07:00
spy_ng_module_factory_loader.spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00
url_serializer.spec.ts fix(router): fix URL serialization so special characters are only encoded where needed (#22337) 2018-03-06 06:58:08 -08:00
url_tree.spec.ts fix(router): fix query param parsing 2017-04-11 11:15:11 -07:00