@midscene/shared 1.0.1-beta-20251216072405.0 → 1.0.1-beta-20251216140107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/utils.mjs +1 -1
- package/dist/lib/utils.js +1 -1
- package/package.json +1 -1
- package/src/utils.ts +1 -1
package/dist/es/utils.mjs
CHANGED
|
@@ -60,6 +60,6 @@ const antiEscapeScriptTag = (html)=>{
|
|
|
60
60
|
return html.replace(REGEXP_LT, '<').replace(REGEXP_GT, '>');
|
|
61
61
|
};
|
|
62
62
|
function replaceIllegalPathCharsAndSpace(str) {
|
|
63
|
-
return str.replace(/[:*?"
|
|
63
|
+
return str.replace(/[:*?"<>| ]/g, '-');
|
|
64
64
|
}
|
|
65
65
|
export { antiEscapeScriptTag, assert, escapeScriptTag, generateHashId, getGlobalScope, ifInBrowser, ifInNode, ifInWorker, logMsg, repeat, replaceIllegalPathCharsAndSpace, setIsMcp, uuid };
|
package/dist/lib/utils.js
CHANGED
|
@@ -100,7 +100,7 @@ const antiEscapeScriptTag = (html)=>{
|
|
|
100
100
|
return html.replace(REGEXP_LT, '<').replace(REGEXP_GT, '>');
|
|
101
101
|
};
|
|
102
102
|
function replaceIllegalPathCharsAndSpace(str) {
|
|
103
|
-
return str.replace(/[:*?"
|
|
103
|
+
return str.replace(/[:*?"<>| ]/g, '-');
|
|
104
104
|
}
|
|
105
105
|
exports.antiEscapeScriptTag = __webpack_exports__.antiEscapeScriptTag;
|
|
106
106
|
exports.assert = __webpack_exports__.assert;
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -123,5 +123,5 @@ export const antiEscapeScriptTag = (html: string) => {
|
|
|
123
123
|
|
|
124
124
|
export function replaceIllegalPathCharsAndSpace(str: string) {
|
|
125
125
|
// Only replace characters that are illegal in filenames, but preserve path separators
|
|
126
|
-
return str.replace(/[:*?"
|
|
126
|
+
return str.replace(/[:*?"<>| ]/g, '-');
|
|
127
127
|
}
|