WordPress 2.8 Breaks XHTML1.0 Strict

See the title.  Patrick brought this to my attention earlier today, and I spent the better part of an hour hunting down the file that contained the erroneous snippet of wayward code.  It’s in the file wp-includes/general-templates.php, starting on line 124, and it looks something like this:

$form = ‘<form role=”search” method=”get” id=”searchform” action=”‘ . get_option(‘home’) . ‘/” >
<div><label for=”s”>’ . __(‘Search for:’) . ‘</label>
<input type=”text” value=”‘ . esc_attr(apply_filters(‘the_search_query’, get_search_query())) . ‘” name=”s” id=”s” />
<input type=”submit” id=”searchsubmit” value=”‘. esc_attr__(‘Search’) .’” />
</div>
</form>’;

(please forgive the formatting, I’ve got to add some new things to the stylesheet for code snippets)

See that role=”search” bit?  Non-compliant with the XHTML 1.0 Strict standard.  If its giving you trouble as well just remove it.  I didn’t find anything else that breaks the Strict standard for my particular site, but if i do you can be sure I’ll complain about it here.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon
  • TwitThis
  • LinkedIn
  • RSS
  • Slashdot
  • FriendFeed

2 Comments

  1. xhtmltestes
    Posted 2009-07-3 at 13:36:03 | Permalink

    what the hell is my problem? Why am I a frothing-at-the-mouth 11-year-old troll?

  2. Brooke
    Posted 2009-10-31 at 3:36:31 | Permalink

    Thanks a TON for this!

Post a Comment

Your email is never shared. Required fields are marked *

*
*