#9263 closed defect (bug) (invalid)
wp_head() hook introduces invalid markup
Reported by: | pacq | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7.1 |
Component: | Validation | Keywords: | wp_head(), validation |
Focuses: | Cc: |
Description
Starting from version 2.7.1, the wp_head() hook adds in the header the following code:
<style type="text/css"> .recentcomments a { display:inline !important; padding: 0 !important;margin: 0 !important; } </style>
According to the Markup Validator, the validation of the code as "XHTML strict" fails, because the "document type does not allow element style here."
Change History (3)
#2
@
16 years ago
- Resolution set to invalid
- Status changed from new to closed
The theme in question must have the wp_head() call in the wrong place.
That style tag is output for the recent comments widget.
The default theme validates fine with the recent comments widget enabled (even if you change it from XHTML transitional to XHTML strict)
Note: See
TracTickets for help on using
tickets.
Is this when using the default theme with all plugins disabled?
The placement of the
wp_head()
function dictates the placement of its output. In the default theme thewp_head()
call is within the <head> (as it should be in all themes) and I'm fairly sure that a <style> tag is valid in the <head> tag. A plugin, however, could be adding invalid markup via thewp_head
hook and causing this validation error.