Opened 17 years ago
Closed 17 years ago
#4631 closed enhancement (duplicate)
Non-valid XHTML code in widgets.php, line 431
Reported by: | kommix | Owned by: | kommix |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.2 |
Component: | Optimization | Keywords: | widgets, xhtml, valid, non-valid |
Focuses: | Cc: |
Description
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>
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:
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: