War on xml:lang
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 11 Feb 2010 17:25:10 +0000 (17:25 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 11 Feb 2010 17:25:10 +0000 (17:25 +0000)
There is no reason to use this in HTML in addition to the lang
attribute.  No spec requires it (AFAIK) and it's completely redundant.

config/Installer.php
includes/OutputHandler.php
includes/OutputPage.php
includes/SkinTemplate.php
includes/templates/NoLocalSettings.php
includes/templates/PHP4.php

index 5016212..d60f378 100644 (file)
@@ -112,7 +112,7 @@ $ourdb['oracle'] = array(
 
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
 <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <meta name="robots" content="noindex,nofollow"/>
index 72e6562..a55adc5 100644 (file)
@@ -130,7 +130,7 @@ function wfHtmlValidationHandler( $s ) {
 
        $out = <<<EOT
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
 <head>
 <title>HTML validation error</title>
 <style>
index ef8e3fd..0677495 100644 (file)
@@ -2113,7 +2113,7 @@ class OutputPage {
                        foreach($wgXhtmlNamespaces as $tag => $ns) {
                                $ret .= "xmlns:{$tag}=\"{$ns}\" ";
                        }
-                       $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
+                       $ret .= "lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
                }
 
                $ret .= "<head>\n";
index 313a2e3..d13268c 100644 (file)
@@ -314,7 +314,7 @@ class SkinTemplate extends Skin {
                $lang = $wgLang->getCode();
                $dir  = $wgLang->getDir();
                if ( $lang !== $wgContLang->getCode() || $dir !== $wgContLang->getDir() ) {
-                       $attrs = " lang='$lang' xml:lang='$lang' dir='$dir'";
+                       $attrs = " lang='$lang' dir='$dir'";
 
                        $tpl->set( 'userlangattributes', $attrs );
 
index 2acc132..45b758a 100644 (file)
@@ -35,7 +35,7 @@ foreach( $topdirs as $dir ){
 }
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
+<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
        <head>
                <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></title>
                <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
index c409a5e..b071ebd 100644 (file)
@@ -27,7 +27,7 @@ if ( preg_match( '!^(.*)/config/[^/]*.php$!', $scriptUrl, $m ) ) {
 
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
+<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
        <head>
                <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ); ?></title>
                <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />