Skip to content

Commit 13afa85

Browse files
committed
MDL-81925 filter_mathjaxloader: Fixed replacement of grader or less
1 parent a57387f commit 13afa85

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

filter/mathjaxloader/classes/text_filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ protected function insert_span($text, $start, $end) {
246246
* @return string Returns the input string with HTML tags escaped.
247247
*/
248248
private function escape_html_tag_wrapper(string $text): string {
249-
return preg_replace_callback('/\{([^}]+)\}/', function (array $matches): string {
249+
return preg_replace_callback('/\{[^}]*<[^}]+>[^}]*\}/', function (array $matches): string {
250250
$search = ['<', '>'];
251251
$replace = ['&lt;', '&gt;'];
252252
return str_replace($search, $replace, $matches[0]);

0 commit comments

Comments
 (0)