From f7f8c6f0c6b7c2bda3adbb60d846d09e3bdaeb74 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Wed, 15 Jan 2025 10:22:33 +0800 Subject: [PATCH] fix: remove specific unicode characters from removespecialcharacters function --- src/renderer/src/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/utils/index.ts b/src/renderer/src/utils/index.ts index 94166198..d4d8a52e 100644 --- a/src/renderer/src/utils/index.ts +++ b/src/renderer/src/utils/index.ts @@ -154,7 +154,7 @@ export function removeQuotes(str) { export function removeSpecialCharacters(str: string) { // First remove newlines and quotes, then remove other special characters - return str.replace(/[\n"]/g, '').replace(/[^\p{L}\p{M}\p{N}\p{P}\p{S}]/gu, '') + return str.replace(/[\n"]/g, '').replace(/[\p{M}\p{N}\p{P}\p{S}]/gu, '') } export function generateColorFromChar(char: string) {