Skip to content

Commit

Permalink
Fix a crash on Epoxy if text contains '\u200D'
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Dec 13, 2021
1 parent 04d23ce commit c2001e2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ fun CharSequence.findPillsAndProcess(scope: CoroutineScope, processBlock: (PillI
}

fun CharSequence.linkify(callback: TimelineEventController.UrlClickCallback?): CharSequence {
// Do not do anything for texts which contain the Unicode Character 'ZERO WIDTH JOINER' (U+200D) in Emojis
if (contains('\u200D')) {
return this
}
val text = this.toString()
val spannable = toSpannable()
MatrixLinkify.addLinks(spannable, object : MatrixPermalinkSpan.Callback {
Expand Down

0 comments on commit c2001e2

Please sign in to comment.