MDL-81354 core: Escape string of fullname
This commit is contained in:
@@ -79,6 +79,7 @@ class user_groups_editable extends \core\output\inplace_editable {
|
||||
}
|
||||
|
||||
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $this->context));
|
||||
$fullname = htmlspecialchars($fullname, ENT_QUOTES, 'utf-8');
|
||||
$this->edithint = get_string('editusersgroupsa', 'group', $fullname);
|
||||
$this->editlabel = get_string('editusersgroupsa', 'group', $fullname);
|
||||
|
||||
|
||||
@@ -92,8 +92,10 @@ class user_roles_editable extends \core\output\inplace_editable {
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->edithint = get_string('xroleassignments', 'role', fullname($user));
|
||||
$this->editlabel = get_string('xroleassignments', 'role', fullname($user));
|
||||
|
||||
$fullname = htmlspecialchars(fullname($user), ENT_QUOTES, 'utf-8');
|
||||
$this->edithint = get_string('xroleassignments', 'role', $fullname);
|
||||
$this->editlabel = get_string('xroleassignments', 'role', $fullname);
|
||||
|
||||
$attributes = ['multiple' => true];
|
||||
$this->set_type_autocomplete($options, $attributes);
|
||||
|
||||
@@ -335,7 +335,7 @@ class participants extends \table_sql implements dynamic_table {
|
||||
$canreviewenrol = has_capability('moodle/course:enrolreview', $this->context);
|
||||
if ($canreviewenrol) {
|
||||
$canviewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
|
||||
$fullname = fullname($data, $canviewfullnames);
|
||||
$fullname = htmlspecialchars(fullname($data, $canviewfullnames), ENT_QUOTES, 'utf-8');
|
||||
$coursename = format_string($this->course->fullname, true, array('context' => $this->context));
|
||||
require_once($CFG->dirroot . '/enrol/locallib.php');
|
||||
$manager = new \course_enrolment_manager($PAGE, $this->course);
|
||||
|
||||
Reference in New Issue
Block a user