[wp-trac] [WordPress Trac] #4631: Non-valid XHTML code in widgets.php, line 431

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 14 08:05:44 GMT 2007


#4631: Non-valid XHTML code in widgets.php, line 431
--------------------------+-------------------------------------------------
 Reporter:  kommix        |       Owner:  anonymous                       
     Type:  defect        |      Status:  new                             
 Priority:  normal        |   Milestone:  2.2.2                           
Component:  Optimization  |     Version:  2.2                             
 Severity:  normal        |    Keywords:  widgets, xhtml, valid, non-valid
--------------------------+-------------------------------------------------
 When we want to display our archives in a dropdown menu, XHTML would not
 be valid because of the code on line 431 @ wp-includes/widgets.php. Here:

 <select name="archive-dropdown"
 onChange='document.location.href=this.options[this.selectedIndex].value;'>
 <option value=""><?php echo attribute_escape(__('Select Month'));
 ?></option> <?php
 wp_get_archives("type=monthly&format=option&show_post_count=$c"); ?>
 </select>

 The property "onChange" is not valid, which is because it has a capital
 letter. XHTML codes should not have any capital letters. The line should
 be like this:

 <select name="archive-dropdown"
 onchange='document.location.href=this.options[this.selectedIndex].value;'>
 <option value=""><?php echo attribute_escape(__('Select Month'));
 ?></option> <?php
 wp_get_archives("type=monthly&format=option&show_post_count=$c"); ?>
 </select>

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4631>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list