Merge lp:~wgrant/launchpad/html5-charset into lp:launchpad

Proposed by William Grant on 2012-04-03
Status: Merged
Approved by: William Grant on 2012-04-03
Approved revision: no longer in the source branch.
Merged at revision: 15054
Proposed branch: lp:~wgrant/launchpad/html5-charset
Merge into: lp:launchpad
Diff against target: 11 lines (+1/-0)
1 file modified
lib/lp/app/templates/base-layout.pt (+1/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/html5-charset
Reviewer Review Type Date Requested Status
Steve Kowalik (community) code 2012-04-03 Approve on 2012-04-03
Review via email: mp+100541@code.launchpad.net

Commit Message

Declare UTF-8 as the charset using the HTML5 in-document technique, so headerless parsing works.

Description of the Change

It's generally preferred to specify the document charset in the document itself as well as the headers, so a headerless document (eg. saved locally) is able to be parsed correctly. XML is natively UTF-8, but HTML5 isn't, so we need to use an HTML5 meta charset tag.

To post a comment you must log in.
Steve Kowalik (stevenk) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/app/templates/base-layout.pt'
2--- lib/lp/app/templates/base-layout.pt 2012-03-23 20:56:11 +0000
3+++ lib/lp/app/templates/base-layout.pt 2012-04-03 00:49:21 +0000
4@@ -22,6 +22,7 @@
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en" lang="en" dir="ltr">
7 <head>
8+ <meta charset="UTF-8" />
9 <title tal:content="view/fmt:pagetitle">Page Title</title>
10 <link rel="shortcut icon" href="/@@/launchpad.png" />
11 <link