Copy and paste the embed code direct from YouTube into WordPress. Not necessarily a good idea?!

Now that I am starting to pay a bit more attention to my blog again, I started to do some cross browser testing and in the process noticed that none of my YouTube video's were rendering properly in IE7. Pants!
A little bell rang in my head about that nasty embed tag and validation, so next thing I did was pop over to W3C and run a good old validation test. Guess what, yes, crap XHTML. Double pants!
This needs fixing!
XHTML valid, tested in Firefox, IE6, IE7, Chrome and Safari this is what I have come up with.
<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="YouTube Video URL">
<param name="movie" value="YouTube Video URL" />
</object>
Any comments on the above code are most appreciated!
Clearly it would be nice if WordPress could do this automatically, but despite running through the "Upload/Insert>Add Video>From URL" functionality several times, I have been left with the opinion, I could be wrong, that its just not possible in the current version (2.8.5)!?
As plugins can be badly written, whenever possible, I try to avoid them! This said I would be grateful for any recommendations!
Right, must go, off to recode all my previous posts with YouTube videos in them. The joy!!










Hi Allan,
Not sure if this is a viable option for you, but I started using javascript to embed videos when IE7 had the click to activate bug. I still use it so that if someone really wants to see a video I can also start tracking him using js based analytics.
It also make my life so much easier to add new videos (not only youtube ones) on the blog, and it validates too
Here's the code to place in your external js file:
writeFlash = function(id,mwidth,mheight){
if (document.getElementById(id)){
switch(id){
case 'video1':
var movie = "http://www.youtube.com/v/KBdEwpRQRD0&hl=en&fs=1&";
break;
case 'video2':
var movie = "http://www.youtube.com/v/jK7IPbnmvVU&hl=en&fs=1&";
break;
}
document.getElementById(id).innerHTML = '';
}
}
Now to call videos on any blog post you can just use the following code :
Javascript required to watch the video.writeFlash('videoId',480,295);
Replace videoId with the a unique ID and you're off (it matches video1 and video2 from the js file.