* Boolean attributes such as s 'checked', 'disabled', 'readonly', will be handled specially
* Attributes whose values are of boolean type will be treated as [boolean attributes](http://www.w3.org/TR/html5/infrastructure.html#boolean-attributes).
* according to [[booleanAttributes]] and [[showBooleanAttributeValues]].
* And attributes whose values are null will not be rendered.
* @param array $attributes attributes to be rendered. The attribute values will be HTML-encoded using [[encode()]].
* @param array $attributes attributes to be rendered. The attribute values will be HTML-encoded using [[encode()]].
* Attributes whose value is null will be ignored and not put in the rendering result.
* @return string the rendering result. If the attributes are not empty, they will be rendered
* @return string the rendering result. If the attributes are not empty, they will be rendered
* into a string with a leading white space (such that it can be directly appended to the tag name
* into a string with a leading white space (so that it can be directly appended to the tag name
* in a tag. If there is no attribute, an empty string will be returned.
* in a tag. If there is no attribute, an empty string will be returned.
*/
*/
public static function renderTagAttributes($attributes)
public static function renderTagAttributes($attributes)
@ -1357,8 +1320,8 @@ class HtmlBase
$html = '';
$html = '';
foreach ($attributes as $name => $value) {
foreach ($attributes as $name => $value) {
if (isset(static::$booleanAttributes[strtolower($name)])) {