MDL-12192 Do not colonize empty labels, thanks to skodak for spotting
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user