diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php
index bf264d48a5..80389b426a 100644
--- a/framework/helpers/BaseHtml.php
+++ b/framework/helpers/BaseHtml.php
@@ -216,7 +216,7 @@ class BaseHtml
if (isset($options['condition'])) {
$condition = $options['condition'];
unset($options['condition']);
- return "\n" . static::tag('link', '', $options) . "\n";
+ return "";
} else {
return static::tag('link', '', $options);
}
@@ -243,7 +243,7 @@ class BaseHtml
if (isset($options['condition'])) {
$condition = $options['condition'];
unset($options['condition']);
- return "\n" . static::tag('script', '', $options) . "\n";
+ return "";
} else {
return static::tag('script', '', $options);
}
diff --git a/tests/unit/framework/helpers/HtmlTest.php b/tests/unit/framework/helpers/HtmlTest.php
index e5f4f50836..59b93582e3 100644
--- a/tests/unit/framework/helpers/HtmlTest.php
+++ b/tests/unit/framework/helpers/HtmlTest.php
@@ -85,14 +85,14 @@ class HtmlTest extends TestCase
{
$this->assertEquals('', Html::cssFile('http://example.com'));
$this->assertEquals('', Html::cssFile(''));
- $this->assertEquals("\n" . '' . "\n", Html::cssFile('http://example.com', ['condition' => 'IE 9']));
+ $this->assertEquals("", Html::cssFile('http://example.com', ['condition' => 'IE 9']));
}
public function testJsFile()
{
$this->assertEquals('', Html::jsFile('http://example.com'));
$this->assertEquals('', Html::jsFile(''));
- $this->assertEquals("\n" . '' . "\n", Html::jsFile('http://example.com', ['condition' => 'IE 9']));
+ $this->assertEquals("", Html::jsFile('http://example.com', ['condition' => 'IE 9']));
}
public function testBeginForm()