How to delete all <div> which contain only whitespaces+empty nested elements?
How can I remove all <div> elements which contain only whitespaces and nested empty elements?
Example. The following <div> elements with class="foobar" should be found and removed:
- <div class="foobar">
- <div>
- "blank"<br>"blank"<br><br>
- </div>
-
- <p>
- </div>
"blank" in the example above should obviously not mean the text "blank" but the correspondig char