mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
[TASK] Remove IE6 condition in ContentNegotiator
This commit is contained in:
parent
a0e4e943f2
commit
b21afe6f85
@ -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'],
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user