custom_emoji: fix showing emojis that may look like a regular expression
This commit is contained in:
parent
df315a3f3e
commit
6100868c7a
@ -56,7 +56,8 @@ public class CustomEmojiHelper {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(text);
|
||||
for (Emoji emoji : emojis) {
|
||||
CharSequence pattern = new StringBuilder(":").append(emoji.getShortcode()).append(':');
|
||||
Matcher matcher = Pattern.compile(pattern.toString()).matcher(text);
|
||||
Matcher matcher = Pattern.compile(pattern.toString(), Pattern.LITERAL)
|
||||
.matcher(text);
|
||||
while (matcher.find()) {
|
||||
EmojiSpan span = new EmojiSpan(view);
|
||||
builder.setSpan(span, matcher.start(), matcher.end(), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user