mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fix #17625: Fix boolean data
attributes from subkeys rendering in Html::renderTagAttributes()
This commit is contained in:

committed by
Alexander Makarov

parent
09eacd8dc1
commit
d7f69b6676
@ -1955,6 +1955,10 @@ class BaseHtml
|
||||
foreach ($value as $n => $v) {
|
||||
if (is_array($v)) {
|
||||
$html .= " $name-$n='" . Json::htmlEncode($v) . "'";
|
||||
} elseif (is_bool($v)) {
|
||||
if ($v) {
|
||||
$html .= " $name-$n";
|
||||
}
|
||||
} else {
|
||||
$html .= " $name-$n=\"" . static::encode($v) . '"';
|
||||
}
|
||||
|
Reference in New Issue
Block a user