diff --git a/backup/util/ui/renderer.php b/backup/util/ui/renderer.php index 87c137a757a10..3d432af6bb290 100644 --- a/backup/util/ui/renderer.php +++ b/backup/util/ui/renderer.php @@ -134,14 +134,14 @@ public function backup_details($details, $nextstageurl) { $html .= $this->backup_detail_pair(get_string('backupmode', 'backup'), get_string('backupmode'.$details->mode, 'backup')); $html .= $this->backup_detail_pair(get_string('backupdate', 'backup'), userdate($details->backup_date)); $html .= $this->backup_detail_pair(get_string('moodleversion', 'backup'), - html_writer::tag('span', $details->moodle_release, array('class' => 'moodle_release')). - html_writer::tag('span', '['.$details->moodle_version.']', array('class' => 'moodle_version sub-detail'))); + html_writer::tag('span', s($details->moodle_release), array('class' => 'moodle_release')). + html_writer::tag('span', '[' . s($details->moodle_version) .']', array('class' => 'moodle_version sub-detail'))); $html .= $this->backup_detail_pair(get_string('backupversion', 'backup'), - html_writer::tag('span', $details->backup_release, array('class' => 'moodle_release')). - html_writer::tag('span', '['.$details->backup_version.']', array('class' => 'moodle_version sub-detail'))); + html_writer::tag('span', s($details->backup_release), array('class' => 'moodle_release')). + html_writer::tag('span', '[' . s($details->backup_version) . ']', array('class' => 'moodle_version sub-detail'))); $html .= $this->backup_detail_pair(get_string('originalwwwroot', 'backup'), - html_writer::tag('span', $details->original_wwwroot, array('class' => 'originalwwwroot')). - html_writer::tag('span', '['.$details->original_site_identifier_hash.']', array('class' => 'sitehash sub-detail'))); + html_writer::tag('span', s($details->original_wwwroot), array('class' => 'originalwwwroot')). + html_writer::tag('span', '[' . s($details->original_site_identifier_hash) . ']', array('class' => 'sitehash sub-detail'))); if (!empty($details->include_file_references_to_external_content)) { $message = ''; if (backup_general_helper::backup_is_samesite($details)) { @@ -169,8 +169,8 @@ public function backup_details($details, $nextstageurl) { $html .= html_writer::start_tag('div', ['class' => 'backup-section', 'role' => 'table', 'aria-labelledby' => 'backupcoursedetailsheader']); $html .= $this->output->heading(get_string('backupcoursedetails', 'backup'), 2, 'header', 'backupcoursedetailsheader'); - $html .= $this->backup_detail_pair(get_string('coursetitle', 'backup'), $details->course->title); - $html .= $this->backup_detail_pair(get_string('courseid', 'backup'), $details->course->courseid); + $html .= $this->backup_detail_pair(get_string('coursetitle', 'backup'), format_string($details->course->title)); + $html .= $this->backup_detail_pair(get_string('courseid', 'backup'), clean_param($details->course->courseid, PARAM_INT)); // Warning users about front page backups. if ($details->original_course_format === 'site') { @@ -188,7 +188,7 @@ public function backup_details($details, $nextstageurl) { } else { continue; } - $html .= $this->backup_detail_pair(get_string('backupcoursesection', 'backup', $section->title), $value); + $html .= $this->backup_detail_pair(get_string('backupcoursesection', 'backup', format_string($section->title)), $value); $table = null; foreach ($details->activities as $activitykey => $activity) { if ($activity->sectionid != $section->sectionid) { @@ -206,7 +206,7 @@ public function backup_details($details, $nextstageurl) { $icon = new image_icon('monologo', '', $activity->modulename); $table->data[] = array( $this->output->render($icon).$name, - $activity->title, + format_string($activity->title), ($activity->settings[$activitykey.'_userinfo']) ? $yestick : $notick, ); }