Kaynağa Gözat

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

When return URLs query parameters such as
George 5 yıl önce
ebeveyn
işleme
2456e19de2

+ 1 - 1
src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeRoute.js

@@ -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 {