Use encodeURIComponent instead of encodeURI to support returnURLs with more than one query (#20874)

When return URLs query parameters such as
This commit is contained in:
George 2020-04-22 19:39:48 +03:00 committed by GitHub
parent 0ee1420c7f
commit 2456e19de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export default class AuthorizeRoute extends Component {
var link = document.createElement("a");
link.href = this.props.path;
const returnUrl = `${link.protocol}//${link.host}${link.pathname}${link.search}${link.hash}`;
const redirectUrl = `${ApplicationPaths.Login}?${QueryParameterNames.ReturnUrl}=${encodeURI(returnUrl)}`
const redirectUrl = `${ApplicationPaths.Login}?${QueryParameterNames.ReturnUrl}=${encodeURIComponent(returnUrl)}`
if (!ready) {
return <div></div>;
} else {