Merge "Add <!DOCTYPE html> to HTML responses"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 16 Dec 2016 07:16:45 +0000 (07:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 16 Dec 2016 07:16:45 +0000 (07:16 +0000)
includes/OutputPage.php
includes/WebRequest.php

index bae871e..eee879c 100644 (file)
@@ -2303,7 +2303,7 @@ class OutputPage extends ContextSource {
                                $response->header( "Content-Type: text/html; charset=utf-8" );
                                if ( $config->get( 'DebugRedirects' ) ) {
                                        $url = htmlspecialchars( $redirect );
-                                       print "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>\n";
+                                       print "<!DOCTYPE html>\n<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>\n";
                                        print "<p>Location: <a href=\"$url\">$url</a></p>\n";
                                        print "</body>\n</html>\n";
                                } else {
index 3ef3bc1..90a0fba 100644 (file)
@@ -1099,6 +1099,7 @@ class WebRequest {
                header( 'Content-Type: text/html' );
                $encUrl = htmlspecialchars( $url );
                echo <<<HTML
+<!DOCTYPE html>
 <html>
 <head>
 <title>Security redirect</title>