So looking at the instructions for theming here, I noticed that one bit of advice was "always validate to XHTML 1.0 strict."

Firefox has some tools to check this, so I did. And the page I have, doesn't validate.

However, there doesn't seem to be anything in the actual theme causing it. The error message beigns here:

<a href="/?q=user/login&destination=comment%2Freply%2F454%23comm

The flagged part is "destination" and the ampersand -- it's "supposed" to end with a semicolon (the whole statement) but apparently doesn't.

There's nothing in any file in the theme folder that has the word "destination" in it anywhere, which makes me think this is being inserted by drupal core, not by the theme. If that's so, is it the case that nothing in drupal can validate to XHTML 1.0 strict? I notice some similar (but not identical) XHTML 1.0 strict errors on the drupal site itself -- the drupal site doesn't validate either.

So what's the deal here... is Drupal just not XHTML 1.0 compliant in the core, and thus nothing you can do with theme can fix that? Or what?

Thanks in advance.

SV

Comments

briansol’s picture

Ampersands must be written out as &amp; to validate strict.

Steve Viscido’s picture

I understand that but.. where's the offending code being generated? If it's not in the theme but somewhere coming from the core, then it doesn't seem like anything I can do within the theme's CSS or something, can change that... can it?

Maybe I'm just not understanding...

jevi’s picture

I'm having the same type of problems. I'm using PHPTemplate by modifying Box_grey and the w3c validator points several errors on the tags generated by the $header variable, which outputs the result of the function drupal_get_html_head(). The errors are simple 'end tag for "meta" omitted, but OMITTAG NO was specified' easily fixed by inserting '/>' at the end of the string, but not accesible from the theme.

Is there any solution for this problems?

Albion_Arg’s picture

I´m a newbie in this, but i´m getting the same error as you do.
I´m using box_cleanslate (a variant of box_grey) and W3C tells me i don´t have perfect code since:
"ID "edit-form_id" already defined ."
This is because the same ID is being used for the search box and the user login box.
Has anyone got any workaround for this?

Regards,
Albion