mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Fixed broken links when only a line break separates the end of the link and the rest of the text
This commit is contained in:
parent
f5ce0d9cdb
commit
8f116a84e4
1 changed files with 6 additions and 2 deletions
|
|
@ -318,7 +318,9 @@ public final class LinphoneUtils {
|
|||
int indexHttp = text.indexOf("http://");
|
||||
int indexFinHttp =
|
||||
text.indexOf(" ", indexHttp) == -1
|
||||
? text.length()
|
||||
? (text.indexOf("<br>", indexHttp) == -1
|
||||
? text.length()
|
||||
: text.indexOf("<br>", indexHttp))
|
||||
: text.indexOf(" ", indexHttp);
|
||||
String link = text.substring(indexHttp, indexFinHttp);
|
||||
String linkWithoutScheme = link.replace("http://", "");
|
||||
|
|
@ -331,7 +333,9 @@ public final class LinphoneUtils {
|
|||
int indexHttp = text.indexOf("https://");
|
||||
int indexFinHttp =
|
||||
text.indexOf(" ", indexHttp) == -1
|
||||
? text.length()
|
||||
? (text.indexOf("<br>", indexHttp) == -1
|
||||
? text.length()
|
||||
: text.indexOf("<br>", indexHttp))
|
||||
: text.indexOf(" ", indexHttp);
|
||||
String link = text.substring(indexHttp, indexFinHttp);
|
||||
String linkWithoutScheme = link.replace("https://", "");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue