From: Tom Gilder Date: Mon, 7 Feb 2005 14:11:59 +0000 (+0000) Subject: Always include xmlns and xml:lang even when serving non-XHTML MIME type X-Git-Tag: 1.5.0alpha1~758 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=a44c6df5ec95099f1850236b2120cb365bb094c7;p=lhc%2Fweb%2Fwiklou.git Always include xmlns and xml:lang even when serving non-XHTML MIME type --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 96543bac23..61356299e1 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -729,8 +729,7 @@ class OutputPage { global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType; global $wgUser, $wgContLang, $wgRequest; - $xml = ($wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml'); - if( $xml ) { + if( $wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml' ) { $ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n"; } else { $ret = ''; @@ -741,13 +740,9 @@ class OutputPage { if ( "" == $this->mHTMLtitle ) { $this->mHTMLtitle = wfMsg( "pagetitle", $this->mPagetitle ); } - if( $xml ) { - $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"$wgContLanguageCode\""; - } else { - $xmlbits = ''; - } + $rtl = $wgContLang->isRTL() ? " dir='RTL'" : ''; - $ret .= "\n"; + $ret .= "\n"; $ret .= "\n" . htmlspecialchars( $this->mHTMLtitle ) . "\n"; array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );