Treat boolean attributes as HTML properties
This commit is contained in:
1 parent
abec449ed8
commit
1add9b421a
1 file changed
+5
@@ -447,6 +447,11 @@ class HtmlBuilder
|
|||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
$key = $value;
|
$key = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Treat boolean attributes as HTML properties
|
||||||
|
if (is_bool($value)) {
|
||||||
|
return $value ? $key : '';
|
||||||
|
}
|
||||||
|
|
||||||
if (! is_null($value)) {
|
if (! is_null($value)) {
|
||||||
return $key . '="' . e($value) . '"';
|
return $key . '="' . e($value) . '"';
|
||||||
|
|||||||
Reference in new issue
Block a user