--- extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php
+++ extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php
@@ -1339,7 +1339,7 @@
                     $output .= '<img src="' . $imageUrl . '" class="ezoeItemCustomTag ' . $name .
                                '" type="custom"' . $customAttributePart . $styleString . ' />';
                 }
-                else if ( $tag->textContent === '' )
+                else if ( $tag->textContent === '' && !$tag->hasChildNodes())
                 {
                     // for empty custom tag, just put a paragraph with the name
                     // of the custom tag in to handle it in the rich text editor
