Always remove empty images

This commit is contained in:
M66B 2020-11-15 20:37:27 +01:00
parent b2764c0c40
commit f5fa40f678
1 changed files with 6 additions and 4 deletions

View File

@ -955,6 +955,11 @@ public class HtmlHelper {
String src = img.attr("src");
String tracking = img.attr("x-tracking");
if (TextUtils.isEmpty(src)) {
img.remove();
continue;
}
if (alt.length() > MAX_ALT)
alt = alt.substring(0, MAX_ALT) + "";
@ -1547,11 +1552,8 @@ public class HtmlHelper {
img.removeAttr("x-tracking");
String src = img.attr("src");
if (TextUtils.isEmpty(src)) {
if (!full)
img.remove();
if (TextUtils.isEmpty(src))
continue;
}
Uri uri = Uri.parse(src);
String host = uri.getHost();