Index: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php (revision 53033)
+++ trunk/phase3/includes/OutputPage.php (revision 53034)
@@ -1547,7 +1547,7 @@
public function headElement( Skin $sk ) {
global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces;
- global $wgContLang, $wgUseTrackbacks, $wgStyleVersion;
+ global $wgContLang, $wgUseTrackbacks, $wgStyleVersion, $wgHtml5;
$this->addMeta( "http:Content-Type", "$wgMimeType; charset={$wgOutputEncoding}" );
if ( $sk->commonPrintStylesheet() ) {
@@ -1561,7 +1561,11 @@
$ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
}
- $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n";
+ if ( $wgHtml5 ) {
+ $ret .= '<!doctype html>';
+ } else {
+ $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n";
+ }
if ( '' == $this->getHTMLTitle() ) {
$this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ));
@@ -1592,7 +1596,7 @@
}
protected function addDefaultMeta() {
- global $wgVersion;
+ global $wgVersion, $wgHtml5;
static $called = false;
if ( $called ) {
@@ -1601,7 +1605,9 @@
}
$called = true;
- $this->addMeta( 'http:Content-Style-Type', 'text/css' ); //bug 15835
+ if ( !$wgHtml5 ) {
+ $this->addMeta( 'http:Content-Style-Type', 'text/css' ); //bug 15835
+ }
$this->addMeta( 'generator', "MediaWiki $wgVersion" );
$p = "{$this->mIndexPolicy},{$this->mFollowPolicy}";
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php (revision 53033)
+++ trunk/phase3/includes/DefaultSettings.php (revision 53034)
@@ -875,6 +875,14 @@
$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
/**
+ * Temporary setting to disable HTML 5 for the unlikely event that it causes
+ * everything to blow up. If all goes well, should be removed (and forced
+ * true) well before it ever makes it into a release. If set to false, go back
+ * to serving an XHTML 1.0 Transitional doctype (per $wgDocType et al. above).
+ */
+$wgHtml5 = true;
+
+/**
* Permit other namespaces in addition to the w3.org default.
* Use the prefix for the key and the namespace for the value. For
* example: