[TASK] Remove IE6 condition in ContentNegotiator

This commit is contained in:
Guido Schmechel 2022-10-07 22:00:08 +02:00
parent a0e4e943f2
commit b21afe6f85
2 changed files with 0 additions and 29 deletions

View File

@ -228,13 +228,6 @@ class ContentNegotiator
$content = $response->getBody();
$hasXMLHeader = (substr($content ?? '', 0, 5) == '<' . '?xml');
// Fix base tag
$content = preg_replace(
'/<base href="([^"]*)" \/>/',
'<base href="$1"><!--[if lte IE 6]></base><![endif]-->',
$content ?? ''
);
$content = preg_replace("#<\\?xml[^>]+\\?>\n?#", '', $content ?? '');
$content = str_replace(
['/>', 'xml:lang', 'application/xhtml+xml'],

View File

@ -955,28 +955,6 @@ after'
</html>';
$this->assertMatchesRegularExpression('/<head><base href=".*" \/><\/head>/', $this->render($tmpl1));
// HTML4 and 5 will only have it for IE
$tmpl2 = '<!DOCTYPE html>
<html>
<head><% base_tag %></head>
<body><p>test</p><body>
</html>';
$this->assertMatchesRegularExpression(
'/<head><base href=".*" \/><\/head>/',
$this->render($tmpl2)
);
$tmpl3 = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><% base_tag %></head>
<body><p>test</p><body>
</html>';
$this->assertMatchesRegularExpression(
'/<head><base href=".*" \/><\/head>/',
$this->render($tmpl3)
);
// Check that the content negotiator converts to the equally legal formats
$negotiator = new ContentNegotiator();