General Question

webmasterwilliam's avatar

How can I fix the W3C validator which failes due to YouTube adsense video units.

Asked by webmasterwilliam (165points) August 15th, 2008

I am rewriting my website and want to include the Google/YouTube adsense video units. After selecting a video player and content, YouTube generates some code to paste into the website. The code has a <div id=‘vu_ytplayer_vjVQc1PpcFNX8M5q9V25LdG40lvpUJMvuPKHk2G6voU=’> statement (I did change a couple of characters).

Notice that there is an = character at the end of the statement which is causing the W3C validator to fail. This really pisses me off.

I am wondering if anybody has any real email or wesite information to someone at YouTube. I can’t believe that they would produce something like this, and they should fix it as soon as possible.

Observing members: 0 Composing members: 0

4 Answers

webmasterwilliam's avatar

wilhel1812,

Thanks for the link, but the solution that was for was embedding YouTube videos directly. I have subscribed to Google’s YouTube video units for adsense, and YouTube provides the code. Here is the complete snippet which has the nasty equal sign in both the <div> element as well as in the javascript.

<div id=“vu_ytplayer_vjVQc1PpcFNX8M5q9V25LdG40lvpUJMvuPKHk2G6voU=”>
<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/watch_custom_player?id=vjVQc1PpcFNX8M5q9V25LdG40lvpUJMvuPKHk2G6voU=”></script>

See, it’s not the same type of code as the example you provided ;-(

wilhel1812's avatar

Oh sorry, i should have read more closely :(

This guy seem to have solved it somehow

webmasterwilliam's avatar

You ROCK!!!!!!!! Great find. I’m so excited. I can’t believe that YouTube produces that crap causing this workaround, but my page now validates. I bow down to your Sherlock Holmes investigative skills.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther