diff --git a/phpdotnet/phd/Format/Abstract/XHTML.php b/phpdotnet/phd/Format/Abstract/XHTML.php
index 12f57171..4d67268f 100644
--- a/phpdotnet/phd/Format/Abstract/XHTML.php
+++ b/phpdotnet/phd/Format/Abstract/XHTML.php
@@ -31,7 +31,10 @@ public function transformFromMap($open, $tag, $name, $attrs, $props) {
$id = $attrs[Reader::XMLNS_XML]["id"];
$idstr = ' id="' .$id. '"';
}
- return '<' .$tag. ' class="' .$name. '"' . $idstr . ($props["empty"] ? '/' : "") . '>';
+ if ($props["empty"]) {
+ return '<' .$tag. ' class="' .$name. '"' . $idstr . '>' .$tag. '>';
+ }
+ return '<' .$tag. ' class="' .$name. '"' . $idstr . '>';
}
return '' .$tag. '>';
}
diff --git a/tests/package/generic/data/empty_title_001.xml b/tests/package/generic/data/empty_title_001.xml
new file mode 100644
index 00000000..56c13c1c
--- /dev/null
+++ b/tests/package/generic/data/empty_title_001.xml
@@ -0,0 +1,7 @@
+
+
Some content after empty title
+