Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1547,7 +1547,7 @@ |
1548 | 1548 | public function headElement( Skin $sk ) { |
1549 | 1549 | global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType; |
1550 | 1550 | global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; |
1551 | | - global $wgContLang, $wgUseTrackbacks, $wgStyleVersion; |
| 1551 | + global $wgContLang, $wgUseTrackbacks, $wgStyleVersion, $wgHtml5; |
1552 | 1552 | |
1553 | 1553 | $this->addMeta( "http:Content-Type", "$wgMimeType; charset={$wgOutputEncoding}" ); |
1554 | 1554 | if ( $sk->commonPrintStylesheet() ) { |
— | — | @@ -1561,7 +1561,11 @@ |
1562 | 1562 | $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n"; |
1563 | 1563 | } |
1564 | 1564 | |
1565 | | - $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n"; |
| 1565 | + if ( $wgHtml5 ) { |
| 1566 | + $ret .= '<!doctype html>'; |
| 1567 | + } else { |
| 1568 | + $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n"; |
| 1569 | + } |
1566 | 1570 | |
1567 | 1571 | if ( '' == $this->getHTMLTitle() ) { |
1568 | 1572 | $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() )); |
— | — | @@ -1592,7 +1596,7 @@ |
1593 | 1597 | } |
1594 | 1598 | |
1595 | 1599 | protected function addDefaultMeta() { |
1596 | | - global $wgVersion; |
| 1600 | + global $wgVersion, $wgHtml5; |
1597 | 1601 | |
1598 | 1602 | static $called = false; |
1599 | 1603 | if ( $called ) { |
— | — | @@ -1601,7 +1605,9 @@ |
1602 | 1606 | } |
1603 | 1607 | $called = true; |
1604 | 1608 | |
1605 | | - $this->addMeta( 'http:Content-Style-Type', 'text/css' ); //bug 15835 |
| 1609 | + if ( !$wgHtml5 ) { |
| 1610 | + $this->addMeta( 'http:Content-Style-Type', 'text/css' ); //bug 15835 |
| 1611 | + } |
1606 | 1612 | $this->addMeta( 'generator', "MediaWiki $wgVersion" ); |
1607 | 1613 | |
1608 | 1614 | $p = "{$this->mIndexPolicy},{$this->mFollowPolicy}"; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -875,6 +875,14 @@ |
876 | 876 | $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; |
877 | 877 | |
878 | 878 | /** |
| 879 | + * Temporary setting to disable HTML 5 for the unlikely event that it causes |
| 880 | + * everything to blow up. If all goes well, should be removed (and forced |
| 881 | + * true) well before it ever makes it into a release. If set to false, go back |
| 882 | + * to serving an XHTML 1.0 Transitional doctype (per $wgDocType et al. above). |
| 883 | + */ |
| 884 | +$wgHtml5 = true; |
| 885 | + |
| 886 | +/** |
879 | 887 | * Permit other namespaces in addition to the w3.org default. |
880 | 888 | * Use the prefix for the key and the namespace for the value. For |
881 | 889 | * example: |