diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 34b5cd9a044c049f3cdceb83dbd1d497e0e28553..8add0436388f53525d2c9a895aae248311737845 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -1020,11 +1020,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
                 }
             }
             return $this->_xmlEntities($default);
-        } else if ( is_string($title) ) {
-            return $this->_xmlEntities($title);
         } else if ( is_array($title) ) {
             $isImage = true;
             return $this->_imageTitle($title);
+        } else {
+            return $this->_xmlEntities($title);
         }
     }