Updated html helper, do not add attributes that have NULL values
This commit is contained in:
parent
74f4cd8e8e
commit
0ad4f2c8bb
|
@ -264,6 +264,12 @@ class html_Core {
|
|||
$compiled = '';
|
||||
foreach ($attributes as $key => $value)
|
||||
{
|
||||
if ($value === NULL)
|
||||
{
|
||||
// Skip attributes that have NULL values
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add the attribute value
|
||||
$compiled .= ' '.$key.'="'.htmlspecialchars($value, ENT_QUOTES, Kohana::$charset, TRUE).'"';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue