-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.3, 3.4
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-60942-master -
The format_string function in lib/weblib.php caches the strings in a static variable however the key it generates for the cache doesn't include the 'filter' option which means that a request to format a string with filters won't actually apply the filters if format_string has already been called on that string without filters.
E.g.
format_string('some string', true, ['context' => 1, 'filter' => false]);
and
format_string('some string', true, ['context' => 1, 'filter' => true]);
produce the same result, even though the second call requests that the filters apply.