Merge branch 'MDL-55587-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE
This commit is contained in:
@@ -105,7 +105,7 @@ class filter_mediaplugin_testcase extends advanced_testcase {
|
||||
$paddedurl = str_pad($originalurl, 6000, 'z');
|
||||
$validpaddedurl = '<p>Some text.</p><pre style="color: rgb(0, 0, 0); line-height: normal;"><span class="mediaplugin mediaplugin_youtube">
|
||||
<iframe title="Valid link" width="400" height="300"
|
||||
src="https://www.youtube.com/embed/uUhWl9Lm3OM?rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
|
||||
src="https://www.youtube.com/embed/uUhWl9Lm3OM?rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
|
||||
</span></pre><pre style="color: rgb(0, 0, 0); line-height: normal;">';
|
||||
$validpaddedurl = str_pad($validpaddedurl, 6000 + (strlen($validpaddedurl) - strlen($originalurl)), 'z');
|
||||
|
||||
|
||||
+3
-3
@@ -540,20 +540,20 @@ class core_media_player_youtube extends core_media_player_external {
|
||||
$params = '';
|
||||
$start = self::get_start_time($url);
|
||||
if ($start > 0) {
|
||||
$params .= "start=$start&";
|
||||
$params .= "start=$start&";
|
||||
}
|
||||
|
||||
$listid = $url->param('list');
|
||||
// Check for non-empty but valid playlist ID.
|
||||
if (!empty($listid) && !preg_match('/[^a-zA-Z0-9\-_]/', $listid)) {
|
||||
// This video is part of a playlist, and we want to embed it as such.
|
||||
$params .= "list=$listid&";
|
||||
$params .= "list=$listid&";
|
||||
}
|
||||
|
||||
return <<<OET
|
||||
<span class="mediaplugin mediaplugin_youtube">
|
||||
<iframe title="$info" width="$width" height="$height"
|
||||
src="https://www.youtube.com/embed/$videoid?{$params}rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
|
||||
src="https://www.youtube.com/embed/$videoid?{$params}rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
|
||||
</span>
|
||||
OET;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user