ZF-2870: HtmlList doesn't pass on the escape parameter for sub lists


The HtmlList helper accepts an 'escape' parameter to determine whether or not to escape given list before rendering. But when it recursively calls itself to render sub lists, it doesn't pass on the escape parameter so sub lists are always escaped.


Duplicity of ZF-2527

It is already fixed in 1.5.0RC3 and in trunk.

Sorry, it was a mistake, I got confused with ZF-2527.

This is not fixed.

The code between 58-69 need some comments, It is not 100%-ly clean; especially:

58: foreach ($items as $item) { if (!is_array($item)) { if ($escape) $item = $this->view->escape($item); $list .= '

' . $item . ''; } else { if (5 < strlen($list)) { $list = substr($list, 0, strlen($list) - 5) . $this->htmlList($item, $ordered, $attribs, $escape) . ''; } else { $list .= '' . $this->htmlList($item, $ordered) . ''; } } } ```

It is related, but doesn't duplicate it.

The Unit test for this item fails to notice this bug because all the item arrays build there all start with a single value, the issue only occurs when the first item in the array is also an array.

Issue ZF-2527 has a diff attached that did properly fix the problem. Line 66 needs to have the attribs and escape added.

Please categorize/fix as needed.

Resetting 'fix version priority' and 'fix version' to be re-evaluated for next release.

Scheduling for next mini release.

Resolved in trunk and 1.5 release branch