From 651d0dfeea896b07cb83c19823715b0a1fd65d07 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 21 Mar 2010 05:12:09 +0000 Subject: [PATCH] Clean up generation slightly --- includes/OutputPage.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index facd93fa7e..4a2b819866 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2093,6 +2093,7 @@ class OutputPage { $dir = $wgContLang->getDir(); + $htmlAttribs = array( 'lang' => $wgContLanguageCode, 'dir' => $dir ); if ( $wgHtml5 ) { if ( $wgWellFormedXml ) { # Unknown elements and attributes are okay in XML, but unknown @@ -2107,19 +2108,17 @@ class OutputPage { # Much saner. $ret .= "\n"; } - $ret .= "\n"; - $ret .= " $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 ) { -- 2.20.1