From b69a3f1ceb90312c54f475aeea8e4770217a8c43 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Fri, 12 Jul 2013 13:59:42 +1200 Subject: [PATCH] MDL-39814 html_writer: Remove superfluous new lines from html_writer::alist --- lib/outputcomponents.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 344d4df486a..7109b1db6ef 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -1347,15 +1347,12 @@ class html_writer { * @return string */ public static function alist(array $items, array $attributes = null, $tag = 'ul') { - $output = ''; - + $output = html_writer::start_tag($tag, $attributes)."\n"; foreach ($items as $item) { - $output .= html_writer::start_tag('li') . "\n"; - $output .= $item . "\n"; - $output .= html_writer::end_tag('li') . "\n"; + $output .= html_writer::tag('li', $item)."\n"; } - - return html_writer::tag($tag, $output, $attributes); + $output .= html_writer::end_tag($tag); + return $output; } /** -- 2.43.0