From e0a8d173bd0540d6ebae001b11b8ba52ea5d9ab2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 22 Jul 2011 11:48:18 -0700 Subject: [PATCH] Add support for nested ul and ol lists. --- system/html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/html.php b/system/html.php index a24b0ee2..f7c53282 100644 --- a/system/html.php +++ b/system/html.php @@ -195,13 +195,13 @@ class HTML { * @param array $attributes * @return string */ - private static function list_elements($type, $list, $attributes) + private static function list_elements($type, $list, $attributes = array()) { $html = ''; foreach ($list as $key => $value) { - $html .= '
  • '.static::entities($value).'
  • '; + $html .= (is_array($value)) ? static::list_elements($type, $value) : '
  • '.static::entities($value).'
  • '; } return '<'.$type.static::attributes($attributes).'>'.$html.'';