Skip to content

Commit

Permalink
HTML5 meta charset
Browse files Browse the repository at this point in the history
  • Loading branch information
afilina committed Jan 27, 2016
1 parent 62885ab commit cbb81ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/HtmlHelper.php
Expand Up @@ -74,7 +74,7 @@ class HtmlHelper extends Helper
'parastart' => '<p{{attrs}}>',
'css' => '<link rel="{{rel}}" href="{{url}}"{{attrs}}/>',
'style' => '<style{{attrs}}>{{content}}</style>',
'charset' => '<meta http-equiv="Content-Type" content="text/html; charset={{charset}}"/>',
'charset' => '<meta charset={{charset}}"/>',
'ul' => '<ul{{attrs}}>{{content}}</ul>',
'ol' => '<ol{{attrs}}>{{content}}</ol>',
'li' => '<li{{attrs}}>{{content}}</li>',
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/View/ViewTest.php
Expand Up @@ -1267,7 +1267,7 @@ public function testRender()
$View->templatePath($this->PostsController->name);
$result = $View->render('index');

$this->assertRegExp("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"\/>\s*<title>/", $result);
$this->assertRegExp("/<meta charset=utf-8\"\/>\s*<title>/", $result);
$this->assertRegExp("/<div id=\"content\">\s*posts index\s*<\/div>/", $result);
$this->assertRegExp("/<div id=\"content\">\s*posts index\s*<\/div>/", $result);

Expand All @@ -1286,7 +1286,7 @@ public function testRender()
$View->templatePath($this->PostsController->name);
$result = $View->render('index');

$this->assertRegExp("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"\/>\s*<title>/", $result);
$this->assertRegExp("/<meta charset=utf-8\"\/>\s*<title>/", $result);
$this->assertRegExp("/<div id=\"content\">\s*posts index\s*<\/div>/", $result);
}

Expand Down

0 comments on commit cbb81ac

Please sign in to comment.