From 49107f11c0522724bacabed9878ff515edadf442 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Wed, 15 Jul 2009 22:55:30 +0000 Subject: [PATCH] Remove some XML cruft from HTML 5 --- includes/OutputPage.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 40b86e587b..e317827bf5 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1737,22 +1737,24 @@ class OutputPage { $ret .= "\n"; } - if ( $wgHtml5 ) { - $ret .= "\n"; - } else { - $ret .= "\n"; - } - if ( '' == $this->getHTMLTitle() ) { $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() )); } $dir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; - $ret .= " $ns) { - $ret .= "xmlns:{$tag}=\"{$ns}\" "; + + if ( $wgHtml5 ) { + $ret .= "\n"; + $ret .= "\n"; + } else { + $ret .= "\n"; + $ret .= " $ns) { + $ret .= "xmlns:{$tag}=\"{$ns}\" "; + } + $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n"; } - $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n"; + $ret .= "\n\t" . htmlspecialchars( $this->getHTMLTitle() ) . "\n\t"; $ret .= implode( "\n", array( $this->getHeadLinks(), -- 2.20.1