Commit e0a8d173 authored by Taylor Otwell's avatar Taylor Otwell

Add support for nested ul and ol lists.

parent 6b50e8b0
......@@ -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 .= '<li>'.static::entities($value).'</li>';
$html .= (is_array($value)) ? static::list_elements($type, $value) : '<li>'.static::entities($value).'</li>';
}
return '<'.$type.static::attributes($attributes).'>'.$html.'</'.$type.'>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment