fix: Refine special character removal in utility function

This commit is contained in:
ousugo 2025-03-10 15:27:16 +08:00 committed by 亢奋猫
parent 49922b960e
commit 1af3cb8419

View File

@ -177,7 +177,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{M}\p{N}\p{P}\p{S}]/gu, '')
return str.replace(/[\n"]/g, '').replace(/[\p{M}\p{P}]/gu, '')
}
export function removeSpecialCharactersForTopicName(str: string) {