What is the preferred method to remove an empty tag from the content of a rich text element?
Example result:
<p>
Lorem<a href="…"></a> ipsum
</p>
When editing text in the WYSIWYG editor (Redactor) the result can contain empty anchor tags. This is a problem when navigating the page with the tab key, for instance, because the user can not see the focus anymore.
How can I automatically remove those artefacts?