Skip to content

Commit

Permalink
fix: encode the url for the path
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 19, 2024
1 parent b86a42f commit 19f4317
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/new-workspace-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function WorkspaceForm() {

await db.files.bulkAdd(
templateData.map(({ path, contents }) => ({
path: `/workspace/${data.name}/${path}`,
path: `/workspace/${data.name}/${encodeURIComponent(path)}`,
contents,
}))
);
Expand Down
2 changes: 1 addition & 1 deletion components/tutorial/generate-template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function GenerateTemplate({
);
await db.files.bulkAdd(
templateData.map(({ path, contents }) => ({
path: `${pathname}/${path}`,
path: `${pathname}/${encodeURIComponent(path)}`,
contents,
}))
);
Expand Down

0 comments on commit 19f4317

Please sign in to comment.