fix: file-menu: faulty folder link if % was in it
Massimo Melina committed
Jun 10, 2024 at 00:39 UTC
a679df3c67de25209f1da888e5bbe5042f157760
1 file changed
+1
-1
frontend/src/fileMenu.ts
+1
-1
@@ -69,7 +69,7 @@ export function openFileMenu(entry: DirEntry, ev: MouseEvent, addToMenu: (FileMe
69
id: 'folder',
70
label: t`Folder`,
71
value: h(Link, {
72
- to: (folder.startsWith('/') ? '' : location.pathname) + folder + '/',
72
+ to: (folder.startsWith('/') ? '' : location.pathname) + folder.split('/').map(encodeURIComponent).join('/') + '/',
73
onClick: () => closeDialog(null, true)
74
}, folder.replaceAll('/', ' / '))
75
},