From: Daniel Kinzler Date: Fri, 13 Nov 2009 21:58:39 +0000 (+0000) Subject: add a version attribute to the tag if RDFa is used with HTML5 X-Git-Tag: 1.31.0-rc.0~38818 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_user_edit%27%2C%20iduser=user.userid%29%20%7D%7D?a=commitdiff_plain;h=8500fd8005a8b35b25d0638f5065e821adb78e70;p=lhc%2Fweb%2Fwiklou.git add a version attribute to the tag if RDFa is used with HTML5 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d7b3a7ccc4..80b9a89da7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -914,6 +914,12 @@ $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; */ $wgHtml5 = true; +/** + * Defines the value of the version attribute in the <html> tag, if any. + * Will be initialized later if not set explicitly. + */ +$wgHtml5Version = null; + /** * Enabled RDFa attributes for use in wikitext. */ diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 47e785d7ca..de43865db9 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1769,7 +1769,7 @@ class OutputPage { */ public function headElement( Skin $sk, $includeStyle = true ) { global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType; - global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; + global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, $wgHtml5Version; global $wgContLang, $wgUseTrackbacks, $wgStyleVersion, $wgEnableScriptLoader, $wgHtml5; $this->addMeta( "http:Content-Type", "$wgMimeType; charset={$wgOutputEncoding}" ); @@ -1792,7 +1792,9 @@ class OutputPage { if ( $wgHtml5 ) { $ret .= "\n"; - $ret .= "\n"; + $ret .= "\n"; $ret .= "setRef( 'xhtmldefaultnamespace', $wgXhtmlDefaultNamespace ); $tpl->set( 'xhtmlnamespaces', $wgXhtmlNamespaces ); + $tpl->set( 'html5version', $wgHtml5Version ); $tpl->set( 'headlinks', $out->getHeadLinks() ); $tpl->set( 'csslinks', $out->buildCssLinks() );