http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66279
Revision: 66279 Author: simetrical Date: 2010-05-12 18:25:50 +0000 (Wed, 12 May 2010) Log Message: ----------- 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: trunk/phase3/includes/OutputPage.php =================================================================== --- trunk/phase3/includes/OutputPage.php 2010-05-12 18:06:14 UTC (rev 66278) +++ trunk/phase3/includes/OutputPage.php 2010-05-12 18:25:50 UTC (rev 66279) @@ -2100,6 +2100,12 @@ $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) ); } + $openHead = Html::openElement( 'head' ); + if ( $openHead ) { + # Don't bother with the newline if $head == '' + $ret .= "$openHead\n"; + } + if ( $wgHtml5 ) { # More succinct than <meta http-equiv=Content-Type>, has the # same effect @@ -2108,14 +2114,8 @@ $this->addMeta( 'http:Content-Type', "$wgMimeType; charset=$wgOutputEncoding" ); } - $openHead = Html::openElement( 'head' ); - if ( $openHead ) { - # Don't bother with the newline if $head == '' - $ret .= "$openHead\n"; - } $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n"; - $ret .= implode( "\n", array( $this->getHeadLinks(), $this->buildCssLinks(), _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs