Skip to content

Commit

Permalink
user selector: MDL-16996- followup - change optgroup label escaping f…
Browse files Browse the repository at this point in the history
…unciton to keep Nicolas Martignoni happy. I can's say I full understand this issue.
  • Loading branch information
tjhunt committed Nov 3, 2008
1 parent 1e08b5c commit 71ef682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user/selector/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ protected function output_options($groupedusers, $search) {
*/
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)) {
Expand All @@ -440,7 +440,7 @@ protected function output_optgroup($groupname, $users, $select) {
$this->output_user($user) . "</option>\n";
}
} else {
$output = ' <optgroup label="' . s($groupname) . '">' . "\n";
$output = ' <optgroup label="' . htmlspecialchars($groupname) . '">' . "\n";
$output .= ' <option disabled="disabled">&nbsp;</option>' . "\n";
}
$output .= " </optgroup>\n";
Expand Down

0 comments on commit 71ef682

Please sign in to comment.