Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Encode params

Tomas Valentaab9b99f1fc4b
diff --git a/apps/docs/src/utils/useSignIn.tsx b/apps/docs/src/utils/useSignIn.tsx
index d943c0d8c..8b1865b18 100644
--- a/apps/docs/src/utils/useSignIn.tsx
+++ b/apps/docs/src/utils/useSignIn.tsx
@@ -23,7 +23,7 @@ export function useSignIn() {
if (opts?.redirectToCurrentUrl !== false) {
const url = typeof window !== 'undefined' ? window.location.href : undefined
- target += 'redirect_to=' + url
+ target += 'redirect_to=' + encodeURI(url)
}
if (opts?.redirectToCurrentUrl !== false && opts?.view) {
@@ -31,7 +31,7 @@ export function useSignIn() {
}
if (opts?.view) {
- target += 'view=' + opts.view
+ target += 'view=' + encodeURI(opts.view)
}
router.push(target, { scroll: true })