From 66480d152434ae78c77e1da6ea7af66762b2f440 Mon Sep 17 00:00:00 2001 From: Alan Pippin Date: Sat, 2 Oct 2010 21:21:14 -0600 Subject: [PATCH] Added urlencode to url for youtube api feed --- ItemAddEmbedVideo.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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

"; -- 2.34.1