mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Block elements with breaks are not empty
This commit is contained in:
parent
db3b9ac42b
commit
a6f2101352
1 changed files with 4 additions and 1 deletions
|
@ -295,7 +295,10 @@ public class HtmlHelper {
|
||||||
|
|
||||||
// Remove block elements displaying nothing
|
// Remove block elements displaying nothing
|
||||||
for (Element e : document.select("*"))
|
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();
|
e.remove();
|
||||||
|
|
||||||
// Prevent too many line breaks
|
// Prevent too many line breaks
|
||||||
|
|
Loading…
Reference in a new issue