[wp-hackers] XHTML 1.1 validity of themes not possible in WP 2.1

Alexander Orlov alexander.orlov at loxal.net
Tue Feb 20 06:58:03 GMT 2007

Trying to keep my blog system state of the art I tried to tune the
default WP 2.1 theme to get it XTHML 1.1 valid. I was a little bit
disappointed as I have recognized that it was not possible without
changing some of the files in /wp-includes. To spare the investigation
of the issues causing the XHTML 1.1 incompatibility I have decided to
post them to this mailing list. So any of the devs read this posting
could fix the issues easily.

There are two issues that make it impossible to create XHTML 1.1
conform themes in WP 2.1:

1. wp-includes/general-template.php:918 (line)

In XHTML 1.1 the html element and other elements have no "lang"
attribute. This attribute has been replaced by the "xml:lang"

2. wp-includes/classes.php:514 and/or

Under certain circumstances the $css_class variable is empty which can
be observed in the XHTML source code in the comments section. The
consequence is an empty li class "<li class="" id="comment-3">" which
is not W3C conform for XHTML 1.1 as well.

I have wrote a blog entry describing these issues precisely:

Best regards / Mit besten Grüßen
Alexander Orlov
www.loxal.net | blog.loxal.net
Hofmannstr. 29 * 91052 Erlangen * Germany

More information about the wp-hackers mailing list