title: Url malformed using symfony command
body: <p>I have an error when I try to run a symfony2 command to import data :</p>
  
  <blockquote>
    <p>url malformed</p>
  </blockquote>
  
  <p>Perhaps is caused because I try to import youtube data like that :</p>
  
  <pre><code>private function importYoutubeMedia(Block $block, TemplateEvenement $template)
      {
          // TODO : Fix Youtube Media issue
          $mediaManager = $this-&gt;container-&gt;get('sonata.media.manager.media');
          $media = new Media();
          $mediaBlock = new PageMedia();
  
          $media-&gt;setName($template-&gt;getTitle());
          $media-&gt;setBinaryContent($template-&gt;getYoutube());
          $media-&gt;setProviderReference($template-&gt;getYoutube());
          $media-&gt;setProviderStatus(1);
          $media-&gt;setContext('media');
          $media-&gt;setProviderName('sonata.media.provider.youtube');
  
          $mediaManager-&gt;save($media);
  
          $mediaBlock-&gt;setMedia($media);
          $mediaBlock-&gt;setBlock($block);
          $block-&gt;addMedia($mediaBlock);
  
          $this-&gt;defaultEm-&gt;persist($mediaBlock);
          $this-&gt;defaultEm-&gt;persist($block);
  
          return $block;
      }
  </code></pre>
  
  <p>I configured my yml with</p>
  
  <pre><code>connector: sonata.media.buzz.connector.curl
  </code></pre>
  
  <p>but the problem persist in command not in sonata bundle interface.</p>