Fix #17625: Fix boolean data attributes from subkeys rendering in Html::renderTagAttributes()

This commit is contained in:
Brandon Kelly
2019-10-22 02:26:28 -07:00
committed by Alexander Makarov
parent 09eacd8dc1
commit d7f69b6676
3 changed files with 20 additions and 0 deletions

View File

@ -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) . '"';
}