1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 03:05:31 +00:00

Block elements with breaks are not empty

This commit is contained in:
M66B 2019-07-08 20:29:00 +02:00
parent db3b9ac42b
commit a6f2101352

View file

@ -295,7 +295,10 @@ public class HtmlHelper {
// Remove block elements displaying nothing
for (Element e : document.select("*"))
if (e.isBlock() && !e.hasText() && e.select("img").size() == 0)
if (e.isBlock() &&
!e.hasText() &&
e.select("br").size() == 0 &&
e.select("img").size() == 0)
e.remove();
// Prevent too many line breaks