angular-cn/packages/router/src
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
..
directives docs: fix link texts 2017-11-01 15:44:59 -04:00
utils refactor(router): compile router cleanly with TypeScript 2.4 (#18465) 2017-08-02 17:32:02 -07:00
apply_redirects.ts build(router): enable bazel tests for router (#21053) 2017-12-22 13:10:51 -08:00
config.ts fix(router): don't mutate route configs (#22358) 2018-02-22 13:35:38 -08:00
create_router_state.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
create_url_tree.ts fix(router): Update types for TypeScript nullability support 2017-04-18 12:07:33 -07:00
events.ts feat(router): add navigationSource and restoredState to NavigationStart event (#21728) 2018-01-29 10:22:59 -08:00
index.ts build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
interfaces.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
pre_activation.ts fix(router): don't use ParamsInheritanceStrategy in declarations (#21574) 2018-01-23 21:34:37 -08:00
private_export.ts refactor(router): cleanup & simplification (#15436) 2017-03-29 09:44:04 -07:00
recognize.ts fix(router): fix wildcard route with lazy loaded module (again) (#18139) 2017-12-22 09:20:11 -08:00
route_reuse_strategy.ts refactor(router): don't run the change detection every time an outlet is activated 2017-05-19 11:55:15 -07:00
router.ts fix(router): don't mutate route configs (#22358) 2018-02-22 13:35:38 -08:00
router_config_loader.ts fix(router): don't mutate route configs (#22358) 2018-02-22 13:35:38 -08:00
router_module.ts feat(router): add "paramsInheritanceStrategy" router configuration option 2017-12-20 10:06:24 -08:00
router_outlet_context.ts refactor(router): don't run the change detection every time an outlet is activated 2017-05-19 11:55:15 -07:00
router_preloader.ts build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
router_state.ts fix(router): remove @internal tag on ParamInheritanceType (#21773) 2018-01-26 10:28:33 -08:00
shared.ts fix(router): resolve and guards should be able to reject with null and undefined (#19418) 2017-09-28 11:06:08 -07:00
url_handling_strategy.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
url_tree.ts fix(router): fix URL serialization so special characters are only encoded where needed (#22337) 2018-03-06 06:58:08 -08:00
version.ts fix(router): update the version placeholder so that it gets replaced during the build 2017-06-19 15:11:06 -07:00