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
<html>
<head>
<title>CSS Child selector emulation for IE 6</title>
<html>
<head>
<title>CSS Child selector emulation for IE 6</title>
- <style type="text/css">
/** Common rules **/
body { background-color: #CCC; }
table { border:1px black solid; }
/** Common rules **/
body { background-color: #CCC; }
table { border:1px black solid; }
</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>
</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>
-<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" dir="ltr">
- <link rel="stylesheet" href="../../skins/common/shared.css" />
+ <link rel="stylesheet" href="../../skins/common/shared.css">
</head>
<body style="font-size: small;">
</head>
<body style="font-size: small;">
<tr><td>line with hover</td><td>line with hover</td></tr>
</table>
<tr><td>line with hover</td><td>line with hover</td></tr>
</table>
-<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" dir="ltr">
- <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>
</head>
<body style="background-color: #C0C0C0;">
<p>
-<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" dir="ltr">
- <style type="text/css">
pre {
border: 1px dashed #AAA;
background-color: #E0E0E0;
pre {
border: 1px dashed #AAA;
background-color: #E0E0E0;
font-family: monospace, DOESNOTEXISTREALLY;'>
font-family: monospace, DOESNOTEXISTREALLY;
</pre>
font-family: monospace, DOESNOTEXISTREALLY;'>
font-family: monospace, DOESNOTEXISTREALLY;
</pre>
<!DOCTYPE html>
<html>
<head>
<!DOCTYPE html>
<html>
<head>
- <style type="text/css">
/** This is just for coloring: */
table { border: 1px solid #CC0; }
td { border: 1px solid #CCC; }
/** This is just for coloring: */
table { border: 1px solid #CC0; }
td { border: 1px solid #CCC; }
'  ' .
htmlspecialchars( $this->getVar( 'wgRightsText' ) ) .
"</p>\n" .
'  ' .
htmlspecialchars( $this->getVar( 'wgRightsText' ) ) .
"</p>\n" .
- "<p style=\"text-align: center\">" .
+ "<p style=\"text-align: center;\">" .
Html::element( 'a',
array(
'href' => $this->getCCPartnerUrl(),
Html::element( 'a',
array(
'href' => $this->getCCPartnerUrl(),
wfMessage( 'config-cc-again' )->text()
) .
"</p>\n" .
wfMessage( 'config-cc-again' )->text()
) .
"</p>\n" .
- "<script type=\"text/javascript\">\n" .
# Reduce the wrapper div height
htmlspecialchars( $reduceJs ) .
"\n" .
# Reduce the wrapper div height
htmlspecialchars( $reduceJs ) .
"\n" .
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) &&
strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) {
// JS appears the only method that works consistently with IE7+
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" );
Xml::encodeJsVar( $lsUrl ) . "; } );</script>\n" );
} else {
$this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );
// this one is needed when the text is inside an HTML markup
$htmlfix = '|<[^>]+$|^[^<>]*>';
// 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>|';
$codefix = '<code>.+?<\/code>|';
- // disable convertsion of <script type="text/javascript"> ... </script>
+ // disable conversion of <script> tags
$scriptfix = '<script.*?>.*?<\/script>|';
$scriptfix = '<script.*?>.*?<\/script>|';
- // disable conversion of <pre xxxx> ... </pre>
+ // disable conversion of <pre> tags
$prefix = '<pre.*?>.*?<\/pre>|';
$reg = '/' . $codefix . $scriptfix . $prefix .
$prefix = '<pre.*?>.*?<\/pre>|';
$reg = '/' . $codefix . $scriptfix . $prefix .
class SeleniumTestHTMLLogger {
public function setHeaders() {
global $wgOut;
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 */
.selenium pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */