Opencast-Moodle / moodle-filter_opencast

Filter to embed Opencast videos in Moodle content
GNU General Public License v3.0
9 stars 9 forks source link

Doesn't work with multiple videos #18

Closed t-schroeder closed 5 years ago

t-schroeder commented 6 years ago

I noticed (using the Atto editor) if you embed two videos in the same text the filter will replace both videos with just a single iframe.

That's because preg_replace is used and it greedily matches everything from <video until the last </video> in the same line. Since Atto seems to concatenate everything to a single line you get this problem as soon as you have multiple video tags (with at least one opencast video) in one text.

On the flipside, if you have a text where the <video and the corresponding </video> are not on the same line the filter doesn't replace it at all.

t-schroeder commented 5 years ago

This has been solved.