diff --git a/Classes/Parser/AbstractParser.php b/Classes/Parser/AbstractParser.php index 50a7a04..df3707a 100644 --- a/Classes/Parser/AbstractParser.php +++ b/Classes/Parser/AbstractParser.php @@ -181,7 +181,9 @@ public function resolveUrlInCss($url) { return $url; } // anything inside TYPO3 has to be adjusted - return '../../../../' . dirname($this->removePrefixFromString(PATH_site, $this->inputFilename)) . '/' . $url; + // the generated css is assumed to be in typo3temp/DynCss, thus we read the typo3 + // install root by going up 2 levels + return '../../' . dirname($this->removePrefixFromString(PATH_site, $this->inputFilename)) . '/' . $url; } /** diff --git a/Tests/Unit/Parser/DummyParserTest.php b/Tests/Unit/Parser/DummyParserTest.php index 9daef95..1f8d40d 100644 --- a/Tests/Unit/Parser/DummyParserTest.php +++ b/Tests/Unit/Parser/DummyParserTest.php @@ -50,7 +50,7 @@ public function setUp() { 'https://typo3.org' => 'https://typo3.org', '/absPath' => '/absPath', 'data:suiehihsidgfiu' => 'data:suiehihsidgfiu', - '../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot' => '../../../../typo3conf/ext/dyncss/Resources/Public/Less/../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot', + '../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot' => '../../typo3conf/ext/dyncss/Resources/Public/Less/../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot', PATH_site . 'yeah' => '../../yeah' ); }