diff --git a/CHANGES.md b/CHANGES.md index 8f20c6daf10..454a9efcdb6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2023-11-04 - Bugfix: Pass footnote content without text_to_html div generation, solves #442. * 2023-10-09 - Improvement: Add a direct 'view course' icon on the course management pages, solves #129. * 2023-10-05 - Improvement: Allow the admin to set the background-position of the background and login background images, solves #111. * 2023-11-03 - Bugfix: Add missing cachedef strings to the language pack, solves #441. diff --git a/layout/includes/footnote.php b/layout/includes/footnote.php index b0e0588e960..87cbae30e89 100644 --- a/layout/includes/footnote.php +++ b/layout/includes/footnote.php @@ -30,7 +30,7 @@ // Only proceed if text area does not only contains empty tags. if (!html_is_blank($footnotesetting)) { // Use format_text function to enable multilanguage filtering. - $footnotesetting = format_text($footnotesetting); + $footnotesetting = format_text($footnotesetting, FORMAT_HTML, ['noclean' => true]); // Add marker to show the footnote to templatecontext. $templatecontext['showfootnote'] = true; diff --git a/tests/behat/theme_boost_union_contentsettings_footer.feature b/tests/behat/theme_boost_union_contentsettings_footer.feature index 20d0ff40247..e5337951da7 100644 --- a/tests/behat/theme_boost_union_contentsettings_footer.feature +++ b/tests/behat/theme_boost_union_contentsettings_footer.feature @@ -19,18 +19,29 @@ Feature: Configuring the theme_boost_union plugin for the "Footer" tab on the "C Scenario: Setting: Footnote - Use the footnote setting to show a string in the page footer on the Dashboard, on the course pages and on the login page Given the following config values are set as admin: - | config | value | plugin | - | footnote | Whatever footnote | theme_boost_union | + | config | value | plugin | + | footnote | FootnoteFussnote | theme_boost_union | + And the "multilang" filter is "on" + And the "multilang" filter applies to "content and headings" When I log in as "admin" And I follow "Dashboard" Then "#footnote" "css_element" should exist - And I should see "Whatever footnote" in the "#footnote" "css_element" + And ".text_to_html" "css_element" should not exist in the "#footnote" "css_element" + And I should see "Footnote" in the "#footnote" "css_element" + And I should not see "Footnote" in the "#footnote" "css_element" + And I should not see "FootnoteFussnote" in the "#footnote" "css_element" And I log out And I log in as "teacher1" And I am on "Course 1" course homepage Then "#footnote" "css_element" should exist - And I should see "Whatever footnote" in the "#footnote" "css_element" + And ".text_to_html" "css_element" should not exist in the "#footnote" "css_element" + And I should see "Footnote" in the "#footnote" "css_element" + And I should not see "Footnote" in the "#footnote" "css_element" + And I should not see "FootnoteFussnote" in the "#footnote" "css_element" And I log out And I follow "Log in" Then "#footnote" "css_element" should exist - And I should see "Whatever footnote" in the "#footnote" "css_element" + And ".text_to_html" "css_element" should not exist in the "#footnote" "css_element" + And I should see "Footnote" in the "#footnote" "css_element" + And I should not see "Footnote" in the "#footnote" "css_element" + And I should not see "FootnoteFussnote" in the "#footnote" "css_element"