diff --git a/core/control/ContentNegotiator.php b/core/control/ContentNegotiator.php index 50738fe0f..cd7c4b834 100755 --- a/core/control/ContentNegotiator.php +++ b/core/control/ContentNegotiator.php @@ -141,8 +141,8 @@ class ContentNegotiator { $response->addHeader("Vary" , "Accept"); // Fix base tag - $content = preg_replace('//', - '', $content); + $content = preg_replace('//', + '', $content); $content = str_replace(' ',' ', $content); $content = str_replace('
','
', $content); @@ -170,7 +170,7 @@ class ContentNegotiator { $hasXMLHeader = (substr($content,0,5) == '<' . '?xml' ); // Fix base tag - $content = preg_replace('/<\/base>/', + $content = preg_replace('//', '', $content); $content = ereg_replace("<\\?xml[^>]+\\?>\n?",'',$content); diff --git a/tests/SSViewerTest.php b/tests/SSViewerTest.php index d651dbe89..3f1e1db7b 100644 --- a/tests/SSViewerTest.php +++ b/tests/SSViewerTest.php @@ -341,7 +341,7 @@ after') <% base_tag %>

test

'; - $this->assertRegExp('/<\/base><\/head>/', $this->render($tmpl1)); + $this->assertRegExp('/<\/head>/', $this->render($tmpl1)); // HTML4 and 5 will only have it for IE $tmpl2 = ' @@ -368,7 +368,7 @@ after') $response = new SS_HTTPResponse($this->render($tmpl1)); $negotiator->xhtml($response); - $this->assertRegExp('/<\/base><\/head>/', $response->getBody()); + $this->assertRegExp('/<\/head>/', $response->getBody()); }