Skip to content

Commit

Permalink
Fixing lack of space in meta tags lacking a link attribute.
Browse files Browse the repository at this point in the history
Fixes #371
  • Loading branch information
markstory committed Feb 20, 2010
1 parent 6a3347e commit 06fc87f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/view/helpers/html.php
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions cake/tests/cases/libs/view/helpers/html.test.php
Expand Up @@ -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')));
Expand Down

0 comments on commit 06fc87f

Please sign in to comment.