Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12483 closed enhancement (fixed)

Short, HTML5 charset declaration for Twenty Ten

Reported by: demetris's profile demetris Owned by: iammattthomas's profile iammattthomas
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

The attached patch changes the charset declaration of 2010 to the new short version introduced with HTML5. That is, for UTF-8:

<meta charset="UTF-8" />

Note that the W3 validator does not yet understand this, and gives a warning that there is no charset declaration at the document level (as distinguished from the HTTP header). See, for example:

http://validator.w3.org/check?uri=http://op111.net/

However, the declaration is understood by ALL user agents, even those that know nothing about HTML5, and is the recommended way of declaring the character set at the document level in HTML5.

(validator.nu, by the way, understands the short declaration fine.)

More:

http://www.w3.org/TR/html5-diff/#character-encoding

http://oli.jp/2009/html5-charset/

http://diveintohtml5.org/semantics.html

The patch also moves the declaration above the TITLE element, to make it the first element of the HEAD section.

Attachments (1)

t12483-html5-charset.diff (909 bytes) - added by demetris 15 years ago.
HTML5 charset declaration for Twenty Ten

Download all attachments as: .zip

Change History (5)

@demetris
15 years ago

HTML5 charset declaration for Twenty Ten

#1 @demetris
15 years ago

  • Cc dkikizas@… added
  • Component changed from General to Themes

#2 @nacin
15 years ago

  • Owner set to iammattthomas
  • Status changed from new to assigned

#3 @iammattthomas
15 years ago

Implemented this in r13565. Thanks demetris.

#4 in reply to: ↑ description @demetris
15 years ago

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

Replying to demetris:

Note that the W3 validator does not yet understand this, and gives a warning that there is no charset declaration at the document level (as distinguished from the HTTP header). See, for example:

http://validator.w3.org/check?uri=http://op111.net/

Well, that was interesting timing!

The W3 validator stopped issuing the warning a few hours after I opened this ticket. :-D It turns out that recognition of the HTML5 charset declaration is one of the enhancements in v0.8.6, which was just released.

Thanks for the commit, Matt. Closing the ticket as fixed.

Note: See TracTickets for help on using tickets.