WordPress.org

Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5519 closed defect (bug) (fixed)

In XHTML header, encoding should be specified before the <title> tag

Reported by: RanYanivHartstein Owned by: ffemtcj
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3.2
Component: General Keywords: has-patch commit tested
Focuses: Cc:

Description

In several places in the WordPress source, there are XHTML headers in which the <title> tag comes before the encoding meta tag.

Since the text in the title can be UTF-8 text, the encoding should be specified before it. Otherwise, in certain cases, the user agent needs to guess the correct encoding for the title.

I enclosed a patch for everywhere I could find where the encoding declaration comes after the <title> tag. I tested it with 2.4-bleeding (r6475).

Attachments (2)

xhtml.diff (7.8 KB) - added by ffemtcj 14 years ago.
xhtml2.3.diff (7.2 KB) - added by ffemtcj 14 years ago.
For 2.3.x

Download all attachments as: .zip

Change History (11)

#1 @lloydbudd
14 years ago

  • Keywords needs-patch added; has-patch tested removed
  • Milestone set to 2.5
  • Version set to 2.3.1

No patch was attached.

@ffemtcj
14 years ago

@ffemtcj
14 years ago

For 2.3.x

#2 @ffemtcj
14 years ago

  • Keywords has-patch reporter-feedback needs-testing added; needs-patch removed
  • Owner changed from anonymous to ffemtcj
  • Status changed from new to assigned

I have made the changes in all locations that I was able to find it in both 2.4 (xhtml.diff) and 2.3.2 (xhtml2.3.diff).

#3 @ffemtcj
14 years ago

  • Keywords reporter-feedback removed

#4 @ffemtcj
14 years ago

  • Cc ffemtcj added

#5 @hansengel
14 years ago

  • Keywords tested added; needs-testing removed

Tested.

Used xhtml2.3.diff with SVN HEAD revision (6566). META Content-Type tag appeared before <title> tag in the HTML source each document that was modified.

#6 @ffemtcj
14 years ago

  • Milestone changed from 2.6 to 2.3.3
  • Version changed from 2.3.1 to 2.3.2

#7 @darkdragon
14 years ago

  • Keywords commit added
  • Milestone changed from 2.3.3 to 2.5

Should be fixed on trunk before moving to 2.3.3.

#8 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6568]) Encoding before title. Props RanYanivHartstein. fixes #5519 for 2.5

#9 @darkdragon
14 years ago

Sweet! Thanks.

Should this be moved to 2.3.3 so that it can be fixed there?

Note: See TracTickets for help on using tickets.