diff --git a/mod_form.php b/mod_form.php index ad9c789..43df097 100644 --- a/mod_form.php +++ b/mod_form.php @@ -48,7 +48,8 @@ public function definition(): void { // Gets only sections with content. foreach ($cm->get_sections() as $sectionnum => $section) { $sectioninfo = $cm->get_section_info($sectionnum); - $s['name'] = $sectioninfo->name; + // Not escaped here, the template escapes it. + $s['name'] = format_string($sectioninfo->name, true, ['context' => $this->context, 'escape' => false]); if (empty($s['name'])) { $s['name'] = get_string('section') . ' ' . $sectionnum; } diff --git a/templates/activityselector.mustache b/templates/activityselector.mustache index f4af534..1e2c4ab 100644 --- a/templates/activityselector.mustache +++ b/templates/activityselector.mustache @@ -68,7 +68,7 @@