dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eefe1b1
)
Clean up <html> generation slightly
author
Aryeh Gregor
<simetrical@users.mediawiki.org>
Sun, 21 Mar 2010 05:12:09 +0000
(
05:12
+0000)
committer
Aryeh Gregor
<simetrical@users.mediawiki.org>
Sun, 21 Mar 2010 05:12:09 +0000
(
05:12
+0000)
includes/OutputPage.php
patch
|
blob
|
history
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
facd93f
..
4a2b819
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-2093,6
+2093,7
@@
class OutputPage {
$dir = $wgContLang->getDir();
$dir = $wgContLang->getDir();
+ $htmlAttribs = array( 'lang' => $wgContLanguageCode, 'dir' => $dir );
if ( $wgHtml5 ) {
if ( $wgWellFormedXml ) {
# Unknown elements and attributes are okay in XML, but unknown
if ( $wgHtml5 ) {
if ( $wgWellFormedXml ) {
# Unknown elements and attributes are okay in XML, but unknown
@@
-2107,19
+2108,17
@@
class OutputPage {
# Much saner.
$ret .= "<!doctype html>\n";
}
# Much saner.
$ret .= "<!doctype html>\n";
}
- $ret .= "<html lang=\"$wgContLanguageCode\" dir=\"$dir\"";
if ( $wgHtml5Version ) {
if ( $wgHtml5Version ) {
- $
ret .= " version=\"$wgHtml5Version\""
;
+ $
htmlAttribs['version'] = $wgHtml5Version
;
}
}
- $ret .= ">\n";
} else {
$ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n";
} else {
$ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n";
- $
ret .= "<html xmlns=\"{$wgXhtmlDefaultNamespace}\" "
;
+ $
htmlAttribs['xmlns'] = $wgXhtmlDefaultNamespace
;
foreach ( $wgXhtmlNamespaces as $tag => $ns ) {
foreach ( $wgXhtmlNamespaces as $tag => $ns ) {
- $
ret .= "xmlns:{$tag}=\"{$ns}\" "
;
+ $
htmlAttribs["xmlns:$tag"] = $ns
;
}
}
- $ret .= "lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
}
}
+ $ret .= Html::element( 'html', $htmlAttribs ) . "\n";
$openHead = Html::openElement( 'head' );
if ( $openHead ) {
$openHead = Html::openElement( 'head' );
if ( $openHead ) {