Drop redundant attributes in hardcoded html
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 20 May 2013 21:47:56 +0000 (23:47 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 20 May 2013 23:05:12 +0000 (01:05 +0200)
Follows-up 97caae596d5493 which makes HTML5 the default
and removes support for XHTML 1.0 and HTML < 5.

* <script type>
* <style type>
* <html xmlns>
* Quick-closing slash in non-XML HTML5 documents

Change-Id: I71855fa8d4095a5a448ebdc3dc36506ddab6f70c

docs/uidesign/child-selector-emu.html
docs/uidesign/design.html
docs/uidesign/mediawiki.action.history.diff.html
docs/uidesign/monospace.html
docs/uidesign/table-layout.html
includes/installer/WebInstallerPage.php
languages/LanguageConverter.php
tests/selenium/SeleniumTestHTMLLogger.php

index 8294b6d..dedb3a6 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
        <title>CSS Child selector emulation for IE 6</title>
-       <style type="text/css">
+       <style>
                /** Common rules **/
                body  { background-color: #CCC; }
                table { border:1px black solid; }
@@ -98,4 +98,3 @@ With child selector we could limit the wikitable styling to the direct childs of
 </tr>
 </table>
 <p><strong>NOTE:</strong>The nested caption keep the green background. The nested table keep the black border. This is because those declarations are global so we did not reset them.</p>
-
index 7062a82..a285a5b 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
-<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" dir="ltr">
 <head>
-       <link rel="stylesheet" href="../../skins/common/shared.css" />
+       <link rel="stylesheet" href="../../skins/common/shared.css">
 </head>
 <body style="font-size: small;">
 
@@ -31,4 +31,5 @@
                <tr><td>line with hover</td><td>line with hover</td></tr>
        </table>
 
-</body></html>
+</body>
+</html>
index 7b8eb2a..5edcfb8 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
-<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" dir="ltr">
 <head>
-       <link rel="stylesheet" href="../../resources/mediawiki.action/mediawiki.action.history.diff.css" />
+       <link rel="stylesheet" href="../../resources/mediawiki.action/mediawiki.action.history.diff.css">
 </head>
 <body style="background-color: #C0C0C0;">
 <p>
@@ -54,4 +54,5 @@ Below are some basic lines being applied one or two classes. Mainly for debuggin
        </td></tr>
 </table>
 
-</body></html>
+</body>
+</html>
index 84ec13a..f2b988e 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
-<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" dir="ltr">
 <head>
-       <style type="text/css">
+       <style>
                pre {
                        border: 1px dashed #AAA;
                        background-color: #E0E0E0;
@@ -75,4 +75,3 @@ font-family: monospace, Verdana;
 font-family: monospace, DOESNOTEXISTREALLY;'>
 font-family: monospace, DOESNOTEXISTREALLY;
 </pre>
-
index 6f53825..2c26819 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-       <style type="text/css">
+       <style>
                /** This is just for coloring: */
                table { border: 1px solid #CC0; }
                td { border: 1px solid  #CCC; }
@@ -57,4 +57,3 @@ On a perfect browser, both tables should look the same</p>
        </tr>
 </table>
 </div>
-
index 3423a06..8a9fc2d 100644 (file)
@@ -1083,7 +1083,7 @@ class WebInstaller_Options extends WebInstallerPage {
                        '&#160;&#160;' .
                        htmlspecialchars( $this->getVar( 'wgRightsText' ) ) .
                        "</p>\n" .
-                       "<p style=\"text-align: center\">" .
+                       "<p style=\"text-align: center;\">" .
                        Html::element( 'a',
                                array(
                                        'href' => $this->getCCPartnerUrl(),
@@ -1092,7 +1092,7 @@ class WebInstaller_Options extends WebInstallerPage {
                                wfMessage( 'config-cc-again' )->text()
                        ) .
                        "</p>\n" .
-                       "<script type=\"text/javascript\">\n" .
+                       "<script>\n" .
                        # Reduce the wrapper div height
                        htmlspecialchars( $reduceJs ) .
                        "\n" .
@@ -1255,8 +1255,7 @@ class WebInstaller_Complete extends WebInstallerPage {
                if ( isset( $_SERVER['HTTP_USER_AGENT'] ) &&
                         strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) {
                        // JS appears the only method that works consistently with IE7+
-                       $this->addHtml( "\n<script type=\"" . $GLOBALS['wgJsMimeType'] .
-                               '">jQuery( document ).ready( function() { document.location=' .
+                       $this->addHtml( "\n<script>jQuery( document ).ready( function () { document.location = " .
                                Xml::encodeJsVar( $lsUrl ) . "; } );</script>\n" );
                } else {
                        $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );
index 0186ccf..e13cb59 100644 (file)
@@ -364,11 +364,11 @@ class LanguageConverter {
                // this one is needed when the text is inside an HTML markup
                $htmlfix = '|<[^>]+$|^[^<>]*>';
 
-               // disable convert to variants between <code></code> tags
+               // disable convert to variants between <code> tags
                $codefix = '<code>.+?<\/code>|';
-               // disable convertsion of <script type="text/javascript"> ... </script>
+               // disable conversion of <script> tags
                $scriptfix = '<script.*?>.*?<\/script>|';
-               // disable conversion of <pre xxxx> ... </pre>
+               // disable conversion of <pre> tags
                $prefix = '<pre.*?>.*?<\/pre>|';
 
                $reg = '/' . $codefix . $scriptfix . $prefix .
index 21332cf..2d4e964 100644 (file)
@@ -3,7 +3,7 @@
 class SeleniumTestHTMLLogger {
        public function setHeaders() {
                global $wgOut;
-               $wgOut->addHeadItem( 'selenium', '<style type="text/css">
+               $wgOut->addHeadItem( 'selenium', '<style>
                .selenium pre {
                        overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
                        white-space: pre-wrap; /* css-3 */