Permalink
Browse files

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

Fixes #371
  • Loading branch information...
1 parent 6a3347e commit 06fc87fc2d6b4b17562a478d8a1a48b7a68bf4b0 @markstory markstory committed Feb 20, 2010
Showing with 3 additions and 1 deletion.
  1. +1 −1 cake/libs/view/helpers/html.php
  2. +2 −0 cake/tests/cases/libs/view/helpers/html.test.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) {
@@ -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')));

0 comments on commit 06fc87f

Please sign in to comment.