fix: Refine special character removal in utility function
This commit is contained in:
parent
8a0a109fb2
commit
3c310c61d8
@ -177,7 +177,7 @@ export function removeQuotes(str) {
|
|||||||
|
|
||||||
export function removeSpecialCharacters(str: string) {
|
export function removeSpecialCharacters(str: string) {
|
||||||
// First remove newlines and quotes, then remove other special characters
|
// 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) {
|
export function removeSpecialCharactersForTopicName(str: string) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user