From 7c3f5863d26f539b4dc690928284d26971d67b4f Mon Sep 17 00:00:00 2001 From: Alexander Bias <alexander.bias@uni-ulm.de> Date: Thu, 14 Jan 2021 14:53:07 +0100 Subject: [PATCH] Bugfix: The infobanner should not clean the entered HTML code too strictly. --- CHANGES.md | 4 ++++ layout/columns2.php | 6 ++++-- layout/login.php | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8b8b3ef..2925dee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-theme_boost_campus Changes ------- +### Unreleased + +* 2021-01-14 - Bugfix: The infobanner should not clean the entered HTML code too strictly. + ### Release v3.10-r1 * 2020-11-28 - Adjusted occurrences of the .row-fluid grid class to .row after the BS4Alpha compatibility layer has been removed in theme Boost core. diff --git a/layout/columns2.php b/layout/columns2.php index b21373f..86aa04a 100644 --- a/layout/columns2.php +++ b/layout/columns2.php @@ -111,7 +111,8 @@ $templatecontext = [ $perpibenable = get_config('theme_boost_campus', 'perpibenable'); if ($perpibenable) { - $perpibcontent = format_text(get_config('theme_boost_campus', 'perpibcontent'), FORMAT_HTML); + $formatoptions = array('noclean' => true, 'newlines' => false); + $perpibcontent = format_text(get_config('theme_boost_campus', 'perpibcontent'), FORMAT_HTML, $formatoptions); // Result of multiselect is a string divided by a comma, so exploding into an array. $perpibshowonpages = explode(",", get_config('theme_boost_campus', 'perpibshowonpages')); $perpibcss = get_config('theme_boost_campus', 'perpibcss'); @@ -135,7 +136,8 @@ if ($perpibenable) { $timedibenable = get_config('theme_boost_campus', 'timedibenable'); if ($timedibenable) { - $timedibcontent = format_text(get_config('theme_boost_campus', 'timedibcontent'), FORMAT_HTML); + $formatoptions = array('noclean' => true, 'newlines' => false); + $timedibcontent = format_text(get_config('theme_boost_campus', 'timedibcontent'), FORMAT_HTML, $formatoptions); // Result of multiselect is a string divided by a comma, so exploding into an array. $timedibshowonpages = explode(",", get_config('theme_boost_campus', 'timedibshowonpages')); $timedibcss = get_config('theme_boost_campus', 'timedibcss'); diff --git a/layout/login.php b/layout/login.php index 2d4c3f8..2c14fbb 100644 --- a/layout/login.php +++ b/layout/login.php @@ -48,7 +48,8 @@ $templatecontext = [ $perpibenable = get_config('theme_boost_campus', 'perpibenable'); if ($perpibenable) { - $perpibcontent = format_text(get_config('theme_boost_campus', 'perpibcontent'), FORMAT_HTML); + $formatoptions = array('noclean' => true, 'newlines' => false); + $perpibcontent = format_text(get_config('theme_boost_campus', 'perpibcontent'), FORMAT_HTML, $formatoptions); // Result of multiselect is a string divided by a comma, so exploding into an array. $perpibshowonpages = explode(",", get_config('theme_boost_campus', 'perpibshowonpages')); $perpibcss = get_config('theme_boost_campus', 'perpibcss'); @@ -67,7 +68,8 @@ if ($perpibenable) { $timedibenable = get_config('theme_boost_campus', 'timedibenable'); if ($timedibenable) { - $timedibcontent = format_text(get_config('theme_boost_campus', 'timedibcontent'), FORMAT_HTML); + $formatoptions = array('noclean' => true, 'newlines' => false); + $timedibcontent = format_text(get_config('theme_boost_campus', 'timedibcontent'), FORMAT_HTML, $formatoptions); // Result of multiselect is a string divided by a comma, so exploding into an array. $timedibshowonpages = explode(",", get_config('theme_boost_campus', 'timedibshowonpages')); $timedibcss = get_config('theme_boost_campus', 'timedibcss'); -- GitLab