Skip to content

Commit 8ad0508

Browse files
committed
fix: sanitize url variables
1 parent d671155 commit 8ad0508

File tree

1 file changed

+4
-2
lines changed
  • packages/web/src/package/ui/KeyDialog/dialogContext

1 file changed

+4
-2
lines changed

packages/web/src/package/ui/KeyDialog/dialogContext/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,10 @@ export const [DialogProvider, useDialogActions, useDialogContext] =
277277
? `${props.uiProps.apiUrl}/projects/${
278278
scopesLoadable.data.projectId
279279
}/translations/single${
280-
branchParam ? `/tree/${branchParam}` : ''
281-
}?key=${props.keyName}${selectedNs ? `&ns=${selectedNs}` : ''}`
280+
branchParam ? `/tree/${encodeURIComponent(branchParam)}` : ''
281+
}?key=${encodeURIComponent(props.keyName)}${
282+
selectedNs ? `&ns=${encodeURIComponent(selectedNs)}` : ''
283+
}`
282284
: undefined;
283285

284286
const [container, setContainer] = useState(

0 commit comments

Comments
 (0)