From: Alan Pippin Date: Sun, 3 Oct 2010 03:21:14 +0000 (-0600) Subject: Added urlencode to url for youtube api feed X-Git-Url: http://git.pippins.net/embedvideo/.git/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/static/%7Bdone_action%7D?a=commitdiff_plain;h=66480d152434ae78c77e1da6ea7af66762b2f440;p=embedvideo%2F.git Added urlencode to url for youtube api feed --- diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc index 544c522..820fe6f 100644 --- a/ItemAddEmbedVideo.inc +++ b/ItemAddEmbedVideo.inc @@ -214,11 +214,15 @@ class ItemAddEmbedVideo extends ItemAddPlugin { /* Handle the high quality format information */ if(preg_match("/fmt=(\d+)/",$extra_params,$matches)) { $extra_params="&ap=%2526fmt%3D".$matches[1]; + if(!strcmp($matches[1],"22")) { + //$youtubeWidth=1280; + //$youtubeHeight=720; + } } } /* Youtube api feed */ - $feed = $youtubeApiUrl."videos/$video_id"; + $feed = $youtubeApiUrl."videos/".urlencode($video_id); if(!strcmp($debugOutput,"true")) { print "\n

Youtube URL Parsing Results

";