diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index 44954d3..8db2e1a 100755 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -339,9 +339,6 @@ class HtmlBuilder { { $html = array(); - // For numeric keys we will assume that the key and the value are the same - // as this will convert HTML attributes such as "required" to a correct - // form like required="required" instead of using incorrect numerics. foreach ((array) $attributes as $key => $value) { $element = $this->attributeElement($key, $value); @@ -361,6 +358,9 @@ class HtmlBuilder { */ protected function attributeElement($key, $value) { + // For numeric keys we will assume that the key and the value are the same + // as this will convert HTML attributes such as "required" to a correct + // form like required="required" instead of using incorrect numerics. if (is_numeric($key)) $key = $value; if ( ! is_null($value)) return $key.'="'.e($value).'"';