aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/html/tag.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/views/default/html/tag.php b/views/default/html/tag.php
index d2f888d49..8ad6679b4 100644
--- a/views/default/html/tag.php
+++ b/views/default/html/tag.php
@@ -41,7 +41,17 @@ foreach ($attributes as $attr => $val) {
$element[] = "$attr=\"$val\"";
}
}
-$element[] = $js;
-$element[] = "/>";
-echo implode(" ", $element); \ No newline at end of file
+if (!empty($js)) {
+ $element[] = $js;
+}
+
+if (!isset($vars['body'])) {
+ $element[] = '/';
+}
+
+echo implode(" ", $element).">";
+
+if (isset($vars['body'])) {
+ echo $vars['body']."</$tag>";
+} \ No newline at end of file