@akiojin/unity-mcp-server 2.26.1 → 2.27.1
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/package.json
CHANGED
|
@@ -267,11 +267,15 @@ export class MenuItemExecuteToolHandler extends BaseToolHandler {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
// Step 1: Remove zero-width and invisible Unicode characters
|
|
270
|
-
//
|
|
271
|
-
let normalized = menuPath
|
|
272
|
-
/[\u200B
|
|
273
|
-
''
|
|
274
|
-
|
|
270
|
+
// Each Unicode category separated to avoid ESLint no-misleading-character-class errors
|
|
271
|
+
let normalized = menuPath
|
|
272
|
+
.replace(/[\u200B\u200C\u200D]/gu, '') // Zero-width spaces/joiners
|
|
273
|
+
.replace(/[\uFEFF]/gu, '') // Zero-width no-break space
|
|
274
|
+
.replace(/[\u00AD]/gu, '') // Soft hyphen
|
|
275
|
+
.replace(/[\u034F]/gu, '') // Combining grapheme joiner
|
|
276
|
+
.replace(/[\u061C]/gu, '') // Arabic letter mark
|
|
277
|
+
.replace(/[\u180E]/gu, '') // Mongolian vowel separator
|
|
278
|
+
.replace(/[\u2060\u2061\u2062\u2063\u2064\u2065\u2066\u2067\u2068\u2069]/gu, ''); // Word joiners
|
|
275
279
|
|
|
276
280
|
// Step 2: Normalize Unicode to canonical form (handles homograph attacks)
|
|
277
281
|
normalized = normalized.normalize('NFC');
|