Commit f6cafa68 authored by Aaron Wells's avatar Aaron Wells
Browse files

Make the embed code regex accept newlines

Bug 1421444

Change-Id: I9bfc571d55a2916f89bdef980b5db316715530e1
parent 46581b13
......@@ -215,7 +215,7 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
if (!filter_var($content, FILTER_VALIDATE_URL)) {
// Not a valid url, so assume it's embed code so check that it's within a tag
if (!preg_match('/^\<.*\>$/', $content)) {
if (!preg_match('/^\<.*\>$/sm', $content)) {
$form->set_error('videoid', get_string('invalidurlorembed', 'blocktype.externalvideo'), false);
// And if so let it go through to htmlpurifier.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment