From e2d138f250769a275a83ac85ccb30b925c135a46 Mon Sep 17 00:00:00 2001 From: fcbsd Date: Mon, 6 Mar 2023 10:59:44 +0000 Subject: [PATCH] MDL-77365 count_words: Make span> an inline tag --- lib/moodlelib.php | 2 +- lib/tests/moodlelib_test.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 9164dceb71b..cb23fab7eef 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -8391,7 +8391,7 @@ function count_words($string) { | b> | del> | em> | i> | - ins> | s> | small> | + ins> | s> | small> | span> | strong> | sub> | sup> | u> ) \w+ # But, apart from those execptions, match any tag name. diff --git a/lib/tests/moodlelib_test.php b/lib/tests/moodlelib_test.php index 991c4ceef8d..d54ace7dd87 100644 --- a/lib/tests/moodlelib_test.php +++ b/lib/tests/moodlelib_test.php @@ -4009,6 +4009,7 @@ EOF; [2, "one\ftwo"], [1, "SO42-"], [6, '4+4=8 i.e. O(1) a,b,c,d I’m black&blue_really'], + [1, 'ab'], ]; }