MDL-12192 Do not colonize empty labels, thanks to skodak for spotting

This commit is contained in:
David Mudrak
2010-07-06 09:58:36 +00:00
parent ec32e626be
commit 1ce51635f7
+1 -1
View File
@@ -1362,7 +1362,7 @@ class html_writer {
$text = trim($text);
$label = self::tag('label', $text, $attributes);
if ($colonize) {
if (!empty($text) and $colonize) {
// the $text may end with the colon already, though it is bad string definition style
$colon = get_string('labelsep', 'langconfig');
if (!empty($colon)) {