Always remove empty images

pull/189/head
M66B 4 years ago
parent b2764c0c40
commit f5fa40f678

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

Loading…
Cancel
Save