From: Aryeh Gregor Date: Wed, 12 May 2010 18:25:50 +0000 (+0000) Subject: Fix validity error caused by r66068 X-Git-Tag: 1.31.0-rc.0~36871 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=e3eb720820ca742d6acc9ebbc686d0cee4da1d21;p=lhc%2Fweb%2Fwiklou.git Fix validity error caused by r66068 The code to output in HTML5 mode was moved above the code to output , so you got before . Reported by Roan Kattouw on IRC. Only affected $wgWellFormedXml = true (the default), because non-well-formed mode just omits entirely. :) --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index d5e71f8852..467330611d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2100,6 +2100,12 @@ class OutputPage { $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 , has the # same effect @@ -2108,14 +2114,8 @@ class OutputPage { $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(),