Permalink
Browse files

Support protocol relative embeds.

Avoid breaking HTTPS pages with insecure embeds.
  • Loading branch information...
1 parent 01f8896 commit 4cd5eb2d98488c35c5eb31012e45e44a0a663d8f @evansims evansims committed Aug 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 hooks/youtube.php
View
2 hooks/youtube.php
@@ -75,7 +75,7 @@ private function _embed_code($id = NULL)
{
if ($id)
{
- return '<div style="margin:15px 0 15px 0"><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/'.$id.'&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'.$id.'&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div>';
+ return '<div style="margin:15px 0 15px 0"><object width="560" height="340"><param name="movie" value="//www.youtube.com/v/'.$id.'&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/'.$id.'&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div>';
}
else
{

0 comments on commit 4cd5eb2

Please sign in to comment.