Fix issue #55 - Crash with index position for URLs

This commit is contained in:
Thomas 2022-05-16 17:33:22 +02:00
parent 11240dcf4d
commit de80c5b914
1 changed files with 3 additions and 0 deletions

View File

@ -184,6 +184,9 @@ public class SpannableHelper {
if (matchEnd > content.toString().length()) {
matchEnd = content.toString().length();
}
if (content.toString().length() > matchEnd) {
matchEnd = content.toString().length();
}
final String url = content.toString().substring(matchStart, matchEnd);
String newURL = Helper.transformURL(context, url);
//If URL has been transformed