Ticket #5519 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

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

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

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

xhtml.diff (7.8 kB) - added by ffemtcj on 12/30/07 19:19:52.
xhtml2.3.diff (7.2 kB) - added by ffemtcj on 12/30/07 19:32:45.
For 2.3.x

Change History

12/23/07 23:11:53 changed by lloydbudd

  • keywords changed from has-patch tested to needs-patch.
  • version set to 2.3.1.
  • milestone set to 2.5.

No patch was attached.

12/30/07 19:19:52 changed by ffemtcj

  • attachment xhtml.diff added.

12/30/07 19:32:45 changed by ffemtcj

  • attachment xhtml2.3.diff added.

For 2.3.x

12/30/07 19:34:21 changed by ffemtcj

  • keywords changed from needs-patch to has-patch, reporter-feedback, needs-testing.
  • 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).

12/30/07 19:45:29 changed by ffemtcj

  • keywords changed from has-patch, reporter-feedback, needs-testing to has-patch, needs-testing.

12/30/07 19:46:31 changed by ffemtcj

  • cc set to ffemtcj.

01/06/08 15:17:12 changed by hansengel

  • keywords changed from has-patch, needs-testing to has-patch, tested.

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.

01/06/08 15:26:14 changed by ffemtcj

  • version changed from 2.3.1 to 2.3.2.
  • milestone changed from 2.6 to 2.3.3.

01/06/08 17:11:18 changed by darkdragon

  • keywords changed from has-patch, tested to has-patch commit tested.
  • milestone changed from 2.3.3 to 2.5.

Should be fixed on trunk before moving to 2.3.3.

01/06/08 19:15:33 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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

01/06/08 20:08:15 changed by darkdragon

Sweet! Thanks.

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