mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Add bidi strip setting and use in os dialogs
This commit is contained in:
@@ -109,7 +109,8 @@ export const ANY_UNICODE_DIR_CONTROL_CHAR_REGEX = new RegExp(
|
||||
POP_DIRECTIONAL_FORMATTING,
|
||||
LTR_OVERRIDE,
|
||||
RTL_OVERRIDE,
|
||||
].join('|')
|
||||
].join('|'),
|
||||
'g'
|
||||
);
|
||||
|
||||
export function hasAnyUnicodeDirControlChars(input: string): boolean {
|
||||
@@ -216,3 +217,7 @@ export function bidiIsolate(text: string): string {
|
||||
}
|
||||
return _bidiIsolate(text);
|
||||
}
|
||||
|
||||
export function bidiStrip(text: string): string {
|
||||
return text.replace(ANY_UNICODE_DIR_CONTROL_CHAR_REGEX, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user