mirror of https://github.com/elk-zone/elk.git
17 lines
877 B
Diff
17 lines
877 B
Diff
diff --git a/dist/index.mjs b/dist/index.mjs
|
|
index 6b5fb1566bee73cefdf165519146604b59ebe7a5..8df0f81f3df4c13bf06b003c472c46db9772db91 100644
|
|
--- a/dist/index.mjs
|
|
+++ b/dist/index.mjs
|
|
@@ -972,10 +972,10 @@ function fileURLToPath(id) {
|
|
}
|
|
const INVALID_CHAR_RE = /[\u0000-\u001F"#$&*+,/:;<=>?@[\]^`{|}\u007F]+/g;
|
|
function sanitizeURIComponent(name = "", replacement = "_") {
|
|
- return name.replace(INVALID_CHAR_RE, replacement);
|
|
+ return name.replace(INVALID_CHAR_RE, replacement).replace(/%../g, replacement);
|
|
}
|
|
function sanitizeFilePath(filePath = "") {
|
|
- return filePath.split(/[/\\]/g).map((p) => sanitizeURIComponent(p)).join("/").replace(/^([A-Za-z])_\//, "$1:/");
|
|
+ return filePath.replace(/[?#].*$/, '').split(/[/\\]/g).map((p) => sanitizeURIComponent(p)).join("/").replace(/^([A-Za-z])_\//, "$1:/");
|
|
}
|
|
function normalizeid(id) {
|
|
if (typeof id !== "string") {
|