diff --git a/system/View/View.php b/system/View/View.php index 113265697b73..4824cbec1525 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -192,6 +192,15 @@ public function render(string $view, array $options = null, $saveData = null): s if (in_array('toolbar', $after) || array_key_exists('toolbar', $after)) { + // Clean up our path names to make them a little cleaner + foreach (['APPPATH', 'BASEPATH', 'ROOTPATH'] as $path) + { + if (strpos($file, constant($path)) === 0) + { + $file = str_replace(constant($path), $path.'/', $file); + } + } + $output = '
' . $output . '
'; } diff --git a/tests/system/View/ViewTest.php b/tests/system/View/ViewTest.php index 285518d55b7f..386f3d94ae2a 100644 --- a/tests/system/View/ViewTest.php +++ b/tests/system/View/ViewTest.php @@ -136,7 +136,7 @@ public function testRenderFindsView() $view->setVar('testString', 'Hello World'); $expected = '

Hello World

'; - $this->assertEquals($expected, $view->render('simple')); + $this->assertTrue(strpos($view->render('simple'), $expected) !== false); } //--------------------------------------------------------------------