fix: admin/fs: couldn't modify elements with % in the name

Massimo Melina committed Mar 12, 2023 at 16:06 UTC c538433a027fc0aa7480696271d126d2cd49e413
1 file changed +1 -1
admin/src/VfsPage.ts
+1 -1
@@ -101,7 +101,7 @@ export default function VfsPage() {
101 // calculate id and parent fields, and builds the map id2node
102 function recur(node: VfsNode, pre='', parent: VfsNode|undefined=undefined) {
103 node.parent = parent
104 - node.id = prefix(pre, node.name) || '/' // root
104 + node.id = prefix(pre, encodeURIComponent(node.name)) || '/' // root
105 id2node.set(node.id, node)
106 if (!node.children) return
107 for (const n of node.children)