Added urlencode to url for youtube api feed
authorAlan Pippin <apippin@pippins.net>
Sun, 3 Oct 2010 03:21:14 +0000 (21:21 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Sun, 3 Oct 2010 03:21:14 +0000 (21:21 -0600)
ItemAddEmbedVideo.inc

index 544c5225cd970821b8ff23a6379f983313e97ced..820fe6f5f2d0e0ac393698803ee5ac0388c5b92e 100644 (file)
@@ -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<h2>Youtube URL Parsing Results</h2>";