From a4c644d3a331d2595b45409ae12f81501924ade7 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 2 May 2014 15:29:26 +0400 Subject: [PATCH] Fixes #3325: fixed generated markup for conditional comments No changelog line since feature was introduced after beta --- framework/helpers/BaseHtml.php | 4 ++-- tests/unit/framework/helpers/HtmlTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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()