From d43d6b6de93f607644f4a3b64ee13c2b80e280f3 Mon Sep 17 00:00:00 2001 From: Anton Fedorov Date: Mon, 23 Jan 2023 19:53:30 +0300 Subject: [PATCH] fix(graph): encode id in project node tooltip (#14530) --- .../src/app/ui-tooltips/project-node-actions.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/graph/client/src/app/ui-tooltips/project-node-actions.tsx b/graph/client/src/app/ui-tooltips/project-node-actions.tsx index 2d19cafae7..e9c3c8e8ce 100644 --- a/graph/client/src/app/ui-tooltips/project-node-actions.tsx +++ b/graph/client/src/app/ui-tooltips/project-node-actions.tsx @@ -11,6 +11,7 @@ export function ProjectNodeActions({ id }: ProjectNodeToolTipProps) { projectGraphService.getSnapshot().context.tracing; const routeConstructor = useRouteConstructor(); const navigate = useNavigate(); + const encodedId = encodeURIComponent(id); function onExclude() { projectGraphService.send({ @@ -21,17 +22,13 @@ export function ProjectNodeActions({ id }: ProjectNodeToolTipProps) { } function onStartTrace() { - navigate( - routeConstructor(`/projects/trace/${encodeURIComponent(id)}`, true) - ); + navigate(routeConstructor(`/projects/trace/${encodedId}`, true)); } function onEndTrace() { navigate( routeConstructor( - `/projects/trace/${encodeURIComponent(start)}/${encodeURIComponent( - id - )}`, + `/projects/trace/${encodeURIComponent(start)}/${encodedId}`, true ) ); @@ -39,7 +36,7 @@ export function ProjectNodeActions({ id }: ProjectNodeToolTipProps) { return (
- + Focus Exclude