I am completely new to drupal and I am considering to move my page to drupal.
It looks all really great but I am concerned about one point: what about xhtml conformity?
I was not able to find a statement or an entry in the feature list.
So my question is, how much effort is put into valid code output? Can I rely on drupal that
it gives me 100% xhtml valid code?
Thanks
Norbert

Comments

matt_harrold’s picture

I had the same concern when I first started with Drupal, the default theme (Garland) has a few minor problems that make it fail XHTML validation.

However, there are a few themes that are XHTML valid (Denver at least) without further modification, and the modifications required to pass validation with Garland are very minor.

Off the top of my head, the only problems with Garland are a few empty span elements in page.tpl.php (I think that is now fixed), and the duplication of edit-submit as an ID for form buttons.

You can "work around" the the edit-submit issue by placing the following code in your themes template.php file:

$elementCountForHack = 0;
function phptemplate_submit($element) {
  global $elementCountForHack;
  return str_replace('edit-submit', 'edit-submit-' . ++$elementCountForHack, theme('button', $element));
}

Occasionally, you'll find a module that generates invalid XHTML, but a quick bug report to the module developer usually clears up the error pretty quick.