Treat boolean attributes as HTML properties

This commit is contained in:
Cristian Pallarés authored and Cristian Pallarés committed 2016-08-16 09:32:41 +02:00
1 parent abec449ed8
commit 1add9b421a
1 file changed
+5
+5
View File
@@ -447,6 +447,11 @@ class HtmlBuilder
if (is_numeric($key)) {
$key = $value;
}
// Treat boolean attributes as HTML properties
if (is_bool($value)) {
return $value ? $key : '';
}
if (! is_null($value)) {
return $key . '="' . e($value) . '"';