Browse Source

Refactoring

tags/2.0.0-beta
Alexander Kochetov 12 years ago
parent
commit
ef9ceafdca
  1. 7
      framework/yii/helpers/base/Html.php

7
framework/yii/helpers/base/Html.php

@ -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);
}
} }
/** /**

Loading…
Cancel
Save