mirror of https://github.com/M66B/FairEmail.git
Check if anchor has content
This commit is contained in:
parent
e111f8fec5
commit
7014a7e0d7
|
@ -1310,11 +1310,15 @@ public class HtmlHelper {
|
||||||
return true;
|
return true;
|
||||||
else if (node instanceof Element) {
|
else if (node instanceof Element) {
|
||||||
Element element = (Element) node;
|
Element element = (Element) node;
|
||||||
if (!element.isBlock() &&
|
if (element.isBlock())
|
||||||
(element.hasText() ||
|
return false;
|
||||||
element.selectFirst("a[href~=.+]") != null ||
|
if (element.hasText())
|
||||||
element.selectFirst("img[src~=.+]") != null))
|
|
||||||
return true;
|
return true;
|
||||||
|
if (element.selectFirst("img[src~=.+]") != null)
|
||||||
|
return true;
|
||||||
|
for (Element a : element.select("a[href~=.+]"))
|
||||||
|
if (a.childNodes().size() > 0)
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue