Fix false group name and avatar updates.

This commit is contained in:
Alex Hart
2020-09-25 14:46:38 -03:00
committed by Alan Evans
parent 8dbc721c08
commit dc9370c32b
2 changed files with 9 additions and 2 deletions

View File

@@ -181,6 +181,12 @@ public final class StringUtil {
.toString();
}
public static @Nullable String stripBidiProtection(@Nullable String text) {
if (text == null) return null;
return text.replaceAll("[\\u2068\\u2069\\u202c]", "");
}
/**
* Trims a {@link CharSequence} of starting and trailing whitespace. Behavior matches
* {@link String#trim()} to preserve expectations around results.