r53340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53339‎ | r53340 | r53341 >
Date:22:55, 15 July 2009
Author:simetrical
Status:ok
Tags:
Comment:
Remove some XML cruft from HTML 5
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1737,22 +1737,24 @@
17381738 $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
17391739 }
17401740
 1741+ if ( '' == $this->getHTMLTitle() ) {
 1742+ $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ));
 1743+ }
 1744+
 1745+ $dir = $wgContLang->isRTL() ? 'rtl' : 'ltr';
 1746+
17411747 if ( $wgHtml5 ) {
17421748 $ret .= "<!doctype html>\n";
 1749+ $ret .= "<html lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
17431750 } else {
17441751 $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n";
 1752+ $ret .= "<html xmlns=\"{$wgXhtmlDefaultNamespace}\" ";
 1753+ foreach($wgXhtmlNamespaces as $tag => $ns) {
 1754+ $ret .= "xmlns:{$tag}=\"{$ns}\" ";
 1755+ }
 1756+ $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
17451757 }
17461758
1747 - if ( '' == $this->getHTMLTitle() ) {
1748 - $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ));
1749 - }
1750 -
1751 - $dir = $wgContLang->isRTL() ? 'rtl' : 'ltr';
1752 - $ret .= "<html xmlns=\"{$wgXhtmlDefaultNamespace}\" ";
1753 - foreach($wgXhtmlNamespaces as $tag => $ns) {
1754 - $ret .= "xmlns:{$tag}=\"{$ns}\" ";
1755 - }
1756 - $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
17571759 $ret .= "<head>\n\t<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n\t";
17581760 $ret .= implode( "\n", array(
17591761 $this->getHeadLinks(),

Status & tagging log