From a0d1bfd785a86220f23fd20fde37d79b343d6635 Mon Sep 17 00:00:00 2001 From: marko-kraemer Date: Mon, 21 Apr 2025 18:25:54 +0100 Subject: [PATCH] wip --- frontend/src/components/file-renderers/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/file-renderers/index.tsx b/frontend/src/components/file-renderers/index.tsx index b701fccf..cf6e17fd 100644 --- a/frontend/src/components/file-renderers/index.tsx +++ b/frontend/src/components/file-renderers/index.tsx @@ -120,7 +120,7 @@ export function FileRenderer({ // Construct HTML file preview URL if we have a sandbox and the file is HTML const htmlPreviewUrl = (isHtmlFile && project?.sandbox?.sandbox_url && fileName) - ? `${project.sandbox.sandbox_url}/${fileName.replace(/^\/workspace\//, '')}` + ? `${project.sandbox.sandbox_url}/${encodeURIComponent(fileName.replace(/^\/workspace\//, ''))}` : blobHtmlUrl; // Use blob URL as fallback // Clean up blob URL on unmount