fix(angular): preserve special characters encoding when going back (#18323)

This commit is contained in:
Liam DeBeasi
2019-05-21 16:06:31 -04:00
committed by GitHub
parent 48553511be
commit 4339ec3aa9

View File

@ -190,9 +190,12 @@ export class NavController {
* would change the url, so things like queryParams * would change the url, so things like queryParams
* would be ignored unless we create a url tree * would be ignored unless we create a url tree
* More Info: https://github.com/angular/angular/issues/18798 * More Info: https://github.com/angular/angular/issues/18798
*
* Additionally, the router does some encoding under the hood,
* so make sure we are not encoding special characters more than once
*/ */
return this.router!.navigateByUrl( return this.router!.navigateByUrl(
this.router!.createUrlTree([url], options) this.router!.createUrlTree([decodeURIComponent(url.toString())], options)
); );
} }
} }