Don't double-isolate-bidi on phone numbers.

Fixes #10257
This commit is contained in:
Greyson Parrelli
2020-12-17 11:53:58 -05:00
committed by Alan Evans
parent dbf78d1b69
commit ccd405fdce
2 changed files with 16 additions and 10 deletions

View File

@@ -160,8 +160,12 @@ public final class StringUtil {
* For more details, see:
* https://www.w3.org/International/questions/qa-bidi-unicode-controls
*/
public static @NonNull String isolateBidi(@NonNull String text) {
if (text.isEmpty()) {
public static @NonNull String isolateBidi(@Nullable String text) {
if (text == null) {
return "";
}
if (Util.isEmpty(text)) {
return text;
}