forked from mirrors/Fedilab
Fix issue #55 - Crash with index position for URLs
This commit is contained in:
parent
11240dcf4d
commit
de80c5b914
1 changed files with 3 additions and 0 deletions
|
@ -184,6 +184,9 @@ public class SpannableHelper {
|
||||||
if (matchEnd > content.toString().length()) {
|
if (matchEnd > content.toString().length()) {
|
||||||
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);
|
final String url = content.toString().substring(matchStart, matchEnd);
|
||||||
String newURL = Helper.transformURL(context, url);
|
String newURL = Helper.transformURL(context, url);
|
||||||
//If URL has been transformed
|
//If URL has been transformed
|
||||||
|
|
Loading…
Reference in a new issue