From 0ad4f2c8bb8596f76f8b575a4f3a4bd303296463 Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Sun, 31 May 2009 17:40:02 -0500 Subject: [PATCH] Updated html helper, do not add attributes that have NULL values --- system/classes/html.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/classes/html.php b/system/classes/html.php index 2ed4bb6..74d5a46 100644 --- a/system/classes/html.php +++ b/system/classes/html.php @@ -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).'"'; }