Improved SIP URI pattern regex to prevent http URLS containing '@' to be handled as SIP URI
This commit is contained in:
parent
8f0f71d82b
commit
5a6531a75f
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ class ChatMessageData(val chatMessage: ChatMessage) : GenericContactData(chatMes
|
|||
val spannable = Spannable.Factory.getInstance().newSpannable(content.utf8Text?.trim())
|
||||
text.value = PatternClickableSpan()
|
||||
.add(
|
||||
Pattern.compile("(?:<?sips?:)?[^@\\s]+(?:@([^\\s]+))+"),
|
||||
Pattern.compile("(?:<?sips?:)?[a-zA-Z0-9+_.\\-]+(?:@([a-zA-Z0-9+_.\\-;=]+))+(>)?"),
|
||||
object : PatternClickableSpan.SpannableClickedListener {
|
||||
override fun onSpanClicked(text: String) {
|
||||
Log.i("[Chat Message Data] Clicked on SIP URI: $text")
|
||||
|
|
Loading…
Reference in a new issue