From f8f9395ed8f0b67062c15283d574d06fef5fa2ad Mon Sep 17 00:00:00 2001 From: Leon Stringer Date: Mon, 24 Jul 2023 17:31:02 +0100 Subject: [PATCH] MDL-78700 filter_tidy: Stop using 'clean' When libtidy removed option 'drop-font-tags' the docs said to use the 'clean' option instead (see MDL-69951). However, 'clean' replaces legacy style information with classes, the corresponding CSS added in . With 'show-body-only' (used because we're inserting an HTML fragment mid-way through ) that with its CSS is omitted. So 'clean' with 'show-body-only' removes legacy style information, rather than tidying it. Consequently we now drop the 'clean' option. This means tags are no longer dropped as libtidy currently has no equivalent to the removed 'drop-font-tags' functionality. --- filter/tidy/filter.php | 1 - 1 file changed, 1 deletion(-) diff --git a/filter/tidy/filter.php b/filter/tidy/filter.php index 2bdb79ffba3..350beb24f23 100644 --- a/filter/tidy/filter.php +++ b/filter/tidy/filter.php @@ -47,7 +47,6 @@ class filter_tidy extends moodle_text_filter { 'show-body-only' => true, 'tidy-mark' => false, 'drop-proprietary-attributes' => true, - 'clean' => true, 'drop-empty-paras' => true, 'indent' => true, 'quiet' => true,