Skip to content

Commit b7610ec

Browse files
committed
MDL-81925 filter_mathjaxloader: Fixed replacement of grader or less
1 parent 2a900d6 commit b7610ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

filter/mathjaxloader/filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ protected function insert_span($text, $start, $end) {
260260
* @return string Returns the input string with HTML tags escaped.
261261
*/
262262
private function escape_html_tag_wrapper(string $text): string {
263-
return preg_replace_callback('/\{([^}]+)\}/', function(array $matches): string {
263+
return preg_replace_callback('/\{[^}]*<[^}]+>[^}]*\}/', function(array $matches): string {
264264
$search = ['<', '>'];
265265
$replace = ['&lt;', '&gt;'];
266266
return str_replace($search, $replace, $matches[0]);

0 commit comments

Comments
 (0)