I recently posted a link to this YouTube video in chat:
http://www.youtube.com/watch?&v=ieFVN-PKLSA
Here's the link to the message in chat that didn't onebox:
https://chat.stackexchange.com/transcript/message/9023882#9023882
It didn't onebox because of the ampersand before the v
in the query string parameter (even though the link is completely valid).
I've also noticed that many YouTube links won't onebox if there are other query string parameters (which is very common in YouTube links, it's how they track a number of different things like referrals).
That said, could you just parse the query string and pull the v
parameter for the video ID instead of whatever you're doing now? All you need to do is call the ParseQueryString
method on the HttpUtility
class (you don't have to do it this way, but the point is, most of the work is done somewhere for you).
Also, if it's not too much trouble, would you recognize the shortened YouTube links that are formatted like this?
This is the link that's given out on the YouTube page when you want to share, and since I'm copying it to share it here, it would be nice if it was recognized.
&
System.Web
but if it's there, use it (and this being an ASP.NET site, I can't imagine you don't have a reference somewhere in the app domain anyways). Now I know you can fix it quickly. Thanks, I'll expect it by EOD. Toodles!