Fixed empty link anchors

This commit is contained in:
M66B
2020-04-30 14:53:22 +02:00
parent 8e7015e14d
commit c652c5690c

View File

@@ -1934,7 +1934,8 @@ public class HtmlHelper {
switch (element.tagName()) {
case "a":
String href = element.attr("href");
ssb.setSpan(new URLSpan(href), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
if (!TextUtils.isEmpty(href))
ssb.setSpan(new URLSpan(href), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
break;
case "body":
// Do nothing