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