mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
user selector: MDL-16996- followup - change optgroup label escaping funciton to keep Nicolas Martignoni happy. I can's say I full understand this issue.
This commit is contained in:
parent
1e08b5cf79
commit
71ef682259
@ -427,7 +427,7 @@ abstract class user_selector_base {
|
||||
*/
|
||||
protected function output_optgroup($groupname, $users, $select) {
|
||||
if (!empty($users)) {
|
||||
$output = ' <optgroup label="' . s($groupname) . ' (' . count($users) . ')">' . "\n";
|
||||
$output = ' <optgroup label="' . htmlspecialchars($groupname) . ' (' . count($users) . ')">' . "\n";
|
||||
foreach ($users as $user) {
|
||||
$attributes = '';
|
||||
if (!empty($user->disabled)) {
|
||||
@ -440,7 +440,7 @@ abstract class user_selector_base {
|
||||
$this->output_user($user) . "</option>\n";
|
||||
}
|
||||
} else {
|
||||
$output = ' <optgroup label="' . s($groupname) . '">' . "\n";
|
||||
$output = ' <optgroup label="' . htmlspecialchars($groupname) . '">' . "\n";
|
||||
$output .= ' <option disabled="disabled"> </option>' . "\n";
|
||||
}
|
||||
$output .= " </optgroup>\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user