Add line breaks in select options

This commit is contained in:
Isaac Connor 2020-10-15 17:16:14 -04:00
parent 7bb227283d
commit 3c5dc8e8b3
1 changed files with 2 additions and 2 deletions

View File

@ -492,7 +492,7 @@ function htmlSelect($name, $contents, $values, $behaviours=false) {
}
}
return "<select name=\"$name\" id=\"$name\"$behaviourText>".htmlOptions($contents, $values).'</select>';
return "<select name=\"$name\" id=\"$name\"$behaviourText>\n".htmlOptions($contents, $values).'</select>';
}
function htmlOptions($contents, $values) {
@ -520,7 +520,7 @@ function htmlOptions($contents, $values) {
$options_html .= '<option value="'.htmlspecialchars($value, ENT_COMPAT | ENT_HTML401, ini_get('default_charset'), false).'"'.
($selected?' selected="selected"':'').
($disabled?' disabled="disabled"':'').
'>'.htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, ini_get('default_charset'), false).'</option>';
'>'.htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, ini_get('default_charset'), false).'</option>'.PHP_EOL;
}
return $options_html;
}