mirror of https://github.com/logseq/logseq
enhance: utils of safe path join
parent
005719cb06
commit
13091b8781
|
@ -317,7 +317,8 @@ export const nodePath = Object.assign({}, path, {
|
|||
|
||||
try {
|
||||
orURI = new URL(input)
|
||||
input = input.replace(orURI.protocol, '')
|
||||
input = input.replace(orURI.protocol + '//', '')
|
||||
.replace(orURI.protocol, '')
|
||||
.replace(/^\/+/, '/')
|
||||
} catch (_e) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue