This is an automated email from the ASF dual-hosted git repository.

likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 125423ab3 fix(config-ui): project name not encode in blueprint 
connection page (#4885)
125423ab3 is described below

commit 125423ab3fa10d6dd9db967974c306599d64ae94
Author: 青湛 <[email protected]>
AuthorDate: Tue Apr 11 00:06:13 2023 +0800

    fix(config-ui): project name not encode in blueprint connection page (#4885)
---
 config-ui/src/pages/blueprint/detail/blueprint-detail.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx 
b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
index fc11c8d2b..e7e3381ff 100644
--- a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
+++ b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
@@ -41,7 +41,10 @@ export const BlueprintDetail = ({ from = FromEnum.project, 
pname, id }: Props) =
   const paths = useMemo(
     () =>
       from === FromEnum.project
-        ? [`/projects/${pname}/${id}/connection-add`, 
`/projects/${pname}/${id}/`]
+        ? [
+            `/projects/${window.encodeURIComponent(pname ?? 
'')}/${id}/connection-add`,
+            `/projects/${window.encodeURIComponent(pname ?? '')}/${id}/`,
+          ]
         : [`/blueprints/${id}/connection-add`, `/blueprints/${id}/`],
     [from, pname],
   );

Reply via email to