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

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