Fix crashes with empty url content

This commit is contained in:
stom79 2018-10-11 07:41:26 +02:00
parent a833f7ee30
commit 446bfa1d42
1 changed files with 1 additions and 1 deletions

View File

@ -686,7 +686,7 @@ public class Status implements Parcelable{
//noinspection deprecation
key = new SpannableString(Html.fromHtml(matcher.group(2))).toString();
key = key.substring(1);
if( !key.startsWith("#") && !key.startsWith("@") && !matcher.group(1).contains("search?tag=")) {
if( !key.startsWith("#") && !key.startsWith("@") && !key.trim().equals("") && !matcher.group(1).contains("search?tag=")) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
targetedURL.put(key, Html.fromHtml(matcher.group(1), Html.FROM_HTML_MODE_LEGACY).toString());
}