Revert "Made div with br a special case"

This reverts commit 61408dfd02.
This commit is contained in:
M66B 2019-07-08 21:31:00 +02:00
parent 61408dfd02
commit 864b9ebcea
1 changed files with 4 additions and 6 deletions

View File

@ -293,14 +293,12 @@ public class HtmlHelper {
}
}, document);
// Prevent too many line breaks
for (Element div : document.select("div"))
if (div.children().size() == div.select("br").size())
div.tagName("span");
// 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