MDL-30303 fix media playback from URLs with ? query parts

Credit for the rawurlencode() fix goes to Eloy.
This commit is contained in:
Petr Skoda 2011-11-19 18:15:18 +01:00
parent fe41ba7489
commit 7f86bee330
2 changed files with 30 additions and 8 deletions

View file

@ -280,7 +280,7 @@ function resourcelib_embed_flashvideo($fullurl, $title, $clicktoopen) {
}
$output = '<div class="resourcecontent resourceflv">';
$output .= html_writer::tag('span', $clicktoopen, array('id'=>$id, 'class'=>'resourcemediaplugin resourcemediaplugin_flv', 'title'=>$title));
$output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, $fullurl, $width, $height, $autosize)));
$output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, rawurlencode($fullurl), $width, $height, $autosize)));
$output .= '</div>';
return $output;