This commit is contained in:
marko-kraemer 2025-04-21 18:25:54 +01:00
parent 6633dd4bcb
commit a0d1bfd785
1 changed files with 1 additions and 1 deletions

View File

@ -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