diff --git a/public/filter/displayh5p/classes/text_filter.php b/public/filter/displayh5p/classes/text_filter.php index be53ee624d4..2b9892b7bcd 100644 --- a/public/filter/displayh5p/classes/text_filter.php +++ b/public/filter/displayh5p/classes/text_filter.php @@ -60,8 +60,8 @@ class text_filter extends \core_filters\text_filter { 'tagend' => '', ]; - $specialchars = ['?', '&']; - $escapedspecialchars = ['\?', '&']; + $specialchars = ['~', '?', '&']; + $escapedspecialchars = ['\~', '\?', '&']; $h5pcontents = []; $h5plinks = []; @@ -103,7 +103,7 @@ class text_filter extends \core_filters\text_filter { $params + ['ish5plink' => false] ); - $h5pcontenturl->workregexp = '#' . $ultimatepattern . '#'; + $h5pcontenturl->workregexp = '~' . $ultimatepattern . '~'; $h5pcontents[] = $h5pcontenturl; // Regex to find h5p extensions in an tag.