pizzaguy Posted June 18, 2008 Share Posted June 18, 2008 I have managed to solve almost all of my web pages issues regarding XHTML validity but one. When using the Youtube ad player it wont validate. I have seen the posts and fixes for the normal youtube embedded videos but the Ad players are different. this is the basis of their code: <div id='vu_ytplayer_SomeRandomCode'><a href='http://www.youtube.com/browse'>Watch the latest videos on YouTube.com</a></div><script type='text/javascript' src='http://www.youtube.com/cp/SomeRandomBase64Code'></script> The "SomeRandomCode" ends with a '='. According to the W3 Validator the attribute id cannot contain a '=' Does anyone know a way to fix this? Link to comment Share on other sites More sharing options...
boen_robot Posted June 19, 2008 Share Posted June 19, 2008 I don't see a "=" in the div's ID (that is what we're talking about, correct?).Try to use double quotes for the attributes instead of single quotes, i.e. <div id="vu_ytplayer_SomeRandomCode"><a href="http://www.youtube.com/browse">Watch the latest videos on YouTube.com</a></div><script type="text/javascript" src="http://www.youtube.com/cp/SomeRandomBase64Code"></script> Link to comment Share on other sites More sharing options...
pizzaguy Posted June 19, 2008 Author Share Posted June 19, 2008 I don't see a "=" in the div's ID (that is what we're talking about, correct?).Try to use double quotes for the attributes instead of single quotes, i.e.<div id="vu_ytplayer_SomeRandomCode"><a href="http://www.youtube.com/browse">Watch the latest videos on YouTube.com</a></div><script type="text/javascript" src="http://www.youtube.com/cp/SomeRandomBase64Code"></script> Alright ill try that, but the div looked like this:<div id="vu_ytplayer_gHfdsqkb1fdV=">its just a random mix i put there but you get the ideaEDIT: no it didnt work, but it doesnt even work if i use an entity, i guess ill just leave that page invalid... Link to comment Share on other sites More sharing options...
Synook Posted June 20, 2008 Share Posted June 20, 2008 You could dynamically generate the division using JS :)Thats sort of cheating though... Link to comment Share on other sites More sharing options...
boen_robot Posted June 20, 2008 Share Posted June 20, 2008 Thats sort of cheating though...Exactly because of that you might want to contact YouTube asking if you could do it OR ask them to give you a new, valid, ID. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.