Commit 9f449c97 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Revert "Add protocol to Youtube iframe code (Bug #1207140)""

parents cfdc1584 1bc5bd1a
......@@ -225,11 +225,6 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
if (!filter_var($values['videoid'], FILTER_VALIDATE_URL)) {
// Not a url, treat the input as html to be sanitised when rendered.
if (preg_match('/youtu(be|\.be)/',$values['videoid'])) {
// dealing with youtube not having protocol in the iframe embed code
(is_https()) ? $protocol = 'https://' : $protocol = 'http://';
$values['videoid'] = preg_replace('#//#',$protocol,$values['videoid']);
}
$values['html'] = $values['videoid'];
return $values;
}
......
Markdown is supported
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