Ticket #5519 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: RanYanivHartstein Owned by: 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 Download (7.8 KB) - added by ffemtcj 4 years ago.
xhtml2.3.diff Download (7.2 KB) - added by ffemtcj 4 years ago.
For 2.3.x

Change History

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

No patch was attached.

ffemtcj4 years ago

ffemtcj4 years ago

For 2.3.x

  • 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).

  • Keywords reporter-feedback, removed
  • Cc ffemtcj added
  • 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.

  • Version changed from 2.3.1 to 2.3.2
  • Milestone changed from 2.6 to 2.3.3
  • Keywords has-patch commit added; has-patch, removed
  • Milestone changed from 2.3.3 to 2.5

Should be fixed on trunk before moving to 2.3.3.

comment:8   ryan4 years ago

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

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

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.