r66279 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66278‎ | r66279 | r66280 >
Date:18:25, 12 May 2010
Author:simetrical
Status:ok
Tags:
Comment:
Fix validity error caused by r66068

The code to output <meta charset=UTF-8> in HTML5 mode was moved above
the code to output <head>, so you got <meta> before <head>. Reported by
Roan Kattouw on IRC. Only affected $wgWellFormedXml = true (the
default), because non-well-formed mode just omits <head> entirely. :)
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -2100,6 +2100,12 @@
21012101 $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) );
21022102 }
21032103
 2104+ $openHead = Html::openElement( 'head' );
 2105+ if ( $openHead ) {
 2106+ # Don't bother with the newline if $head == ''
 2107+ $ret .= "$openHead\n";
 2108+ }
 2109+
21042110 if ( $wgHtml5 ) {
21052111 # More succinct than <meta http-equiv=Content-Type>, has the
21062112 # same effect
@@ -2108,14 +2114,8 @@
21092115 $this->addMeta( 'http:Content-Type', "$wgMimeType; charset=$wgOutputEncoding" );
21102116 }
21112117
2112 - $openHead = Html::openElement( 'head' );
2113 - if ( $openHead ) {
2114 - # Don't bother with the newline if $head == ''
2115 - $ret .= "$openHead\n";
2116 - }
21172118 $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n";
21182119
2119 -
21202120 $ret .= implode( "\n", array(
21212121 $this->getHeadLinks(),
21222122 $this->buildCssLinks(),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66068Installer is no longer hardcoded to xhtml doctype...nikerabbit13:45, 8 May 2010

Status & tagging log