Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public static String prefixedToolName(String prefix, String toolName) {

String input = prefix + "_" + toolName;

// Replace any character that isn't alphanumeric, underscore, or hyphen with
// concatenation
String formatted = input.replaceAll("[^a-zA-Z0-9_-]", "");
// Replace any character that isn't alphanumeric, underscore, hyphen, or Chinese
// characters with empty string
String formatted = input.replaceAll("[^a-zA-Z0-9_\u4e00-\u9fa5]", "");

formatted = formatted.replaceAll("-", "_");

Expand Down
Loading