Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#9263 closed defect (bug) (invalid)

wp_head() hook introduces invalid markup

Reported by: pacq's profile 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)

#1 @johnbillion
16 years ago

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 the wp_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 the wp_head hook and causing this validation error.

#2 @westi
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)

#3 @Denis-de-Bernardy
16 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.