Skip to content
Snippets Groups Projects
Commit 3f093b3f authored by Justus Dieckmann's avatar Justus Dieckmann
Browse files

Make filter work properly with linebreaks

parent 5f6e9318
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,9 @@ class filter_opencast extends moodle_text_filter {
$height = false;
foreach ($matches as $match) {
if (empty(trim($match))) {
continue;
}
// Check if the match is a video tag.
if (substr($match, 0, 6) === "<video") {
$video = true;
......@@ -163,7 +166,7 @@ class filter_opencast extends moodle_text_filter {
}
// Replace video tag.
$text = preg_replace('/<video(?:(?!<\/video>).)*?' . preg_quote($match, '/') . '.*?<\/video>/',
$text = preg_replace('/<video(?:(?!<\/video>).)*?' . preg_quote($match, '/') . '.*?<\/video>/s',
$newtext, $text, 1);
}
$width = $height = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment