Generate valid HTML code on error pages
authorFomafix <fomafix@googlemail.com>
Mon, 9 Feb 2015 12:04:05 +0000 (12:04 +0000)
committer[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com>
Mon, 9 Feb 2015 12:04:05 +0000 (12:04 +0000)
For img_auth.php see
http://validator.w3.org/check?uri=https%3A%2F%2Fwww.mediawiki.org%2Fw%2Fimg_auth.php;No200=1

For profileinfo.php consistently use "/>" for self-closing elements.

Change-Id: I7e6aad0e7a2a745836adc430e3b2f3be5f31b6bb

img_auth.php
profileinfo.php

index 51470b6..f44cac0 100644 (file)
@@ -201,7 +201,12 @@ function wfForbidden( $msg1, $msg2 ) {
        header( 'Cache-Control: no-cache' );
        header( 'Content-Type: text/html; charset=utf-8' );
        echo <<<ENDS
+<!DOCTYPE html>
 <html>
+<head>
+<meta charset="UTF-8" />
+<title>$msgHdr</title>
+</head>
 <body>
 <h1>$msgHdr</h1>
 <p>$detailMsg</p>
index 4e3fb5a..f172cfb 100644 (file)
@@ -36,7 +36,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
 <!DOCTYPE html>
 <html>
 <head>
-       <meta charset="UTF-8">
+       <meta charset="UTF-8" />
        <title>Profiling data</title>
        <style>
                /* noc.wikimedia.org/base.css */
@@ -422,7 +422,7 @@ if ( isset( $_REQUEST['filter'] ) ) {
        ?>
        </tbody>
 </table>
-<hr>
+<hr />
 <p>Total time: <code><?php printf( '%5.02f', profile_point::$totaltime ); ?></code></p>
 
 <p>Total memory: <code><?php printf( '%5.02f', profile_point::$totalmemory / 1024 ); ?></code></p>