diff --git a/CHANGES.md b/CHANGES.md index 3caecb2a46a65caf508dcd365ab5b65101e58f6e..cf7b7cf8840f3c2cd1395e10937072a4c1fb0b35 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,11 @@ moodle-theme_boost_campus Changes ------- + +### Unreleased + +* 2021-01-14 - Bugfix: The infobanner should not clean the entered HTML code too strictly. + ### Release v3.9-r4 * 2020-11-18 - Change in Moodle release support: diff --git a/layout/columns2.php b/layout/columns2.php index b21373fc9ea4a96ed0375f1c7c8313a451278d81..86aa04affc467d481526276512287b574557b6d4 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 2d4c3f8264f159a874913d604cfbd31a63aa1350..2c14fbbb47fb5fb189b8d328e62b3917d6a4ea83 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');