fix: after creating a folder named %1, the "enter folder" link didn't work
Massimo Melina committed
Jun 10, 2024 at 00:00 UTC
2465f34fba2d74c98c0fe45d663cc576ff02f011
1 file changed
+7
-4
frontend/src/upload.ts
+7
-4
@@ -451,10 +451,13 @@ async function createFolder() {
451
await alertDialog(h(() =>
452
h(FlexV, {},
453
h('div', {}, t`Successfully created`),
454
- h(Link, { to: uri + name + '/', onClickCapture() { // "capture" because dialogs must be closed (popping from history) before we push a new state in the history
455
- closeDialog()
456
- closeDialog()
457
- } }, t('enter_folder', "Enter the folder")),
454
+ h(Link, {
455
+ to: uri + encodeURIComponent(name) + '/',
456
+ onClickCapture() { // "capture" because dialogs must be closed (popping from history) before we push a new state in the history
457
+ closeDialog()
458
+ closeDialog()
459
+ }
460
+ }, t('enter_folder', "Enter the folder")),
461
)))
462
}
463
catch(e: any) {