I tried to validate my site using the W3 validator: http://validator.w3.org/

It says that id and name attributes must begin with a letter, not a digit.

I found the file that's outputting the code here: sites/all/modules/media_youtube/themes/media-youtube-flash.tpl.php.

print $id; " class=" print $classes; ">
print $output;

I don't know how to change the code to make the id attribute begin with a letter. But just wanted to put it here for review in case someone else does. I try to keep all of my sites XHTML 1.0 Strict because it's good practice for SEO.

Thanks again for a good YouTube embed module and many thanks in advance for any tips you might have on how to fix this issue.

Comments

spangaroo’s picture

Here's the full code showing the id/class mentioned above:

<div id="media-youtube-<?php print $id; ?>" class="<?php print $classes; ?>">
  <?php print $output; ?>
</div>
spangaroo’s picture

Title: valid XHTML for <?php print $id; ?> » making it valid XHTML

Might anyone have any feedback on this?

I do think it would be a good improvement for everyone.