[wp-trac] Re: [WordPress Trac] #4631: Non-valid XHTML code in
widgets.php, line 431
WordPress Trac
wp-trac at lists.automattic.com
Sat Jul 14 08:07:01 GMT 2007
#4631: Non-valid XHTML code in widgets.php, line 431
----------------------------------------------+-----------------------------
Reporter: kommix | Owner: kommix
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.2.2
Component: Optimization | Version: 2.2
Severity: normal | Resolution:
Keywords: widgets, xhtml, valid, non-valid |
----------------------------------------------+-----------------------------
Changes (by kommix):
* owner: anonymous => kommix
* status: new => assigned
* type: defect => enhancement
Comment:
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#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list