diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 9d38e0c54d2..3161a96fb7a 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -227,7 +227,7 @@ function meta($type, $url = null, $options = array()) { } $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 40907c02316..17011ae5ce2 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 @@ function testMeta() { $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')));