Fixing lack of space in meta tags lacking a link attribute.

Fixes #371
This commit is contained in:
Mark Story 2010-02-20 01:38:16 -05:00
parent 6a3347ef7c
commit 06fc87fc2d
2 changed files with 3 additions and 1 deletions

View file

@ -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) {

View file

@ -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')));