Embedding YouTube Videos as Valid XHTML 1.0 in WordPress

UPDATE:
For those who don’t like tinkering with this stuff you can always use Viper’s plugin for pretty much any type of video. I’ve actually just started using it and reverted the quicktag changes.

A small addendum to my previous post about Embedding YouTube Videos as Valid XHTML 1.0.

I was tired of copying and pasting the “valid” youtube embed code after doing it once so I went ahead and edited the WordPress quicklinks to add a button which will insert the appropriate code (with the value=transparent). It just inserts the code with a link to a sample video and I just have to cut and paste in the link for the video I want, which is much easier than having to paste or type in the valid code, then paste in the new link. If I figure out how to do it I will eventually make it so that it works like the “link” quicktag and it will open a nice little box where I plug in the YouTube link and it pastes in a finished code.

In the meantime if anyone is interested in a copy of the edited quicktags.js it’s here:
http://www.ttancm.com/mycrap/quicktags.js.txt

Obviously once you save it you need to remove the .txt, then upload it to /wp-includes/js/. Backup your existing file first. I take no responsibility for any damage if your website explodes. I would recommend against overwriting/replacing the file if you have any plugins or hacks which modify your quicktags/editor.
If you don’t want to replace the entire file you can just edit in the added button code:

edButtons[edButtons.length] =
new edButton('ed_youtube'
,'youtube'
,'<object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/7_6B6vwE83U"><param name="movie" value="http://www.youtube.com/v/7_6B6vwE83U" /><param name="wmode" value="transparent" /></object>'
,''
,''
,-1
);
/*

I just pasted it above


edButtons[edButtons.length] =
new edButton('ed_more'
,'more'
,'<!--more-->'
,''
,'t'
,-1
);
/*

A small tutorial on editing quicklinks.js can be found here: http://codex.wordpress.org/User:Westi/Custom_Quicktags

EDIT
Oh, there’s also a <p> button added in that quicklinks.js file.

preload for rolloverimage please ignore preload for rolloverimage please ignore preload for rolloverimage please ignore preload for rolloverimage please ignore preload for rolloverimage please ignore