Closed JLJTGR closed 11 years ago
I'm going to close this because that is an invalid URL. If you go to that URL it 404's (and displays a blank page). Out of curiosity, do you have links to where these URLs appeared?
Closing as invalid/wontfix.
No, it does actually work. This is one of youtube's weird flash things. I'll need to investigate further.
It appears to be related to this https://github.com/kevincox/youtube-o2i/blob/master/data/o2i.js#L23
If you could provide an example of a webpage that does this it would be very helpful.
I apologize, but the YouTube embed URL in my original post wasn't meant to be a real URL that you could click on. I replaced the video ID with 'qwertyuiop' from the top of my keyboard; which is an invalid length for a video ID.
I didn't include the in-the-wild website because the ad/sidebar content was NSFW even though the article content was. (I use Stylish to cut all of that away)
Here is the HTML copied from the page directly:
<p style="text-align: center;"><object height="383" width="472"><param name="movie" value="http://www.youtube.com/v/jcZhrsfI9Y4&hl=en_US&fs=1&rel=0"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/jcZhrsfI9Y4&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="383" width="472"></object></p>
And the original page: (remember, NSFW)
http://www.sankakucomplex.com/2013/10/16/0-1-ton-china-quality-bridge-captured-on-film/
lol Yeah, I noticed the video ID but then forgot to change it when I first tried to see what would happen.
I've decided to "fix" this because youtube does a similar thing when you embed a video with no parameters in the URL (see the code link above for details). I wish sites would quit using the old embed format but the world isn't a perfect place :P
Okay, the code is in the repo and I have submitted a package to AMO for review, it should be up in a number of days.
I don't know if these embed URLs are "valid" or not, but I found them in the wild...
Take the following raw URL:
This gets converted to: (or something to that effect)
In embed2yt.js, lines 31 and 32... if you add an ampersand(&) to the negated character class, it will properly remove the parameters for this syntax style and allow the YouTube app to accept the link.