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:
parent
0ee1420c7f
commit
2456e19de2
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue