ZF-5018: HtmlList should insert newline after

Issue Type: Improvement Created: 2008-11-21T03:53:19.000+0000 Last Updated: 2009-01-12T12:44:23.000+0000 Status: Resolved Fix version(s): - 1.7.2 (23/Dec/08)

Reporter: Bart McLeod ( Assignee: Bart McLeod ( Tags: - Zend_View

Related issues: Attachments: - zf-5018.patch


The HtmlList View helper now renders all elements on a single line. This gives browsers trouble rendering the items if they are displayed inline using css. All browsers break the lines at odd places.

I will add a Zend_View_Helper_HtmlElement::EOL aftere the opening and closing


ul> tags and after each closing tag.


Posted by Bart McLeod ( on 2008-11-21T05:19:45.000+0000

Added a patch for community evaluation. If no objections are commented here I will commit to trunk.

Posted by Bart McLeod ( on 2008-11-21T05:30:35.000+0000

Please review patch.

Posted by old of Satoru Yoshida ( on 2008-12-02T02:22:28.000+0000

Solved in SVN r12984

Posted by Bart McLeod ( on 2008-12-06T14:07:44.000+0000

We broker 3 testcases and introduced a bug with this fix.

If fixed the testcases and the bug, but I commented the latter fix in the wrong issue, but with a matching comment in svn that leads to the correct comment on the wrong issue.

Still not sure if the bugfix is complete, it solves the issue when testing manually, but I will have to look into that again.

For now, I will commit the fixed test.

Posted by Bart McLeod ( on 2008-12-06T14:20:33.000+0000

Changed the original 5 to 6 in this code snippet (the six was needed because we added self:EOL and thus increased the length of with 1)

<pre class="highlight">
        foreach ($items as $item) {
            if (!is_array($item)) {
                if ($escape) {
                    $item = $this->view->escape($item);
                $list .= '' . $item . '' . self::EOL;
            } else {
                if (6 < strlen($list)) {
                    $list = substr($list, 0, strlen($list) - 6)
                     . $this->htmlList($item, $ordered, $attribs, $escape) . '' . self::EOL;
                } else {
                    $list .= '' . $this->htmlList($item, $ordered, $attribs, $escape) . '' . self::EOL;

In my previous commit I had omitted the first 5 and did not change it to 6. This may give unexpected results.

Posted by Christopher Manning (manningc) on 2009-01-12T12:44:22.000+0000

This is still broken in 1.7.2

It seems as if Bart's fix did not make it into the 1.7.2 tag

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.