diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 9d38e0c54..3161a96fb 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -227,7 +227,7 @@ class HtmlHelper extends AppHelper { } $out .= sprintf($this->tags['metalink'], $options['link'], $this->_parseAttributes($options, array('link'), ' ', ' ')); } else { - $out = sprintf($this->tags['meta'], $this->_parseAttributes($options, array('type'))); + $out = sprintf($this->tags['meta'], $this->_parseAttributes($options, array('type'), ' ', ' ')); } if ($inline) { diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index 40907c023..17011ae5c 100644 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -1089,6 +1089,8 @@ class HtmlHelperTest extends CakeTestCase { $result = $this->Html->meta('keywords', 'these, are, some, meta, keywords'); $this->assertTags($result, array('meta' => array('name' => 'keywords', 'content' => 'these, are, some, meta, keywords'))); + $this->assertPattern('/\s+\/>$/', $result); + $result = $this->Html->meta('description', 'this is the meta description'); $this->assertTags($result, array('meta' => array('name' => 'description', 'content' => 'this is the meta description')));