getView()->plugin('escapeHtml');
$item = $escaper($item);
}
$list .= '
' . $item . '' . self::EOL;
} else {
$itemLength = 5 + strlen(self::EOL);
if ($itemLength < strlen($list)) {
$list = substr($list, 0, strlen($list) - $itemLength)
. $this($item, $ordered, $attribs, $escape) . '' . self::EOL;
} else {
$list .= '' . $this($item, $ordered, $attribs, $escape) . '' . self::EOL;
}
}
}
if ($attribs) {
$attribs = $this->htmlAttribs($attribs);
} else {
$attribs = '';
}
$tag = ($ordered) ? 'ol' : 'ul';
return '<' . $tag . $attribs . '>' . self::EOL . $list . '' . $tag . '>' . self::EOL;
}
}