Commit ef9ceafd by Alexander Kochetov

Refactoring

parent 5bf0ba56
...@@ -152,11 +152,8 @@ class Html ...@@ -152,11 +152,8 @@ class Html
*/ */
public static function tag($name, $content = '', $options = array()) public static function tag($name, $content = '', $options = array())
{ {
if (isset(static::$voidElements[strtolower($name)])) { $html = "<$name" . static::renderTagAttributes($options) . '>';
return static::beginTag($name, $options); return isset(static::$voidElements[strtolower($name)]) ? $html : "$html$content</$name>";
} else {
return static::beginTag($name, $options) . $content . static::endTag($name);
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment