Browse Source

Remove default type attribute from style tag as well.

It is not needed in HTML5.
Mark Story 12 years ago
parent
commit
3ec7093e84
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/View/Helper/HtmlHelper.php
  2. 2 2
      tests/TestCase/View/Helper/HtmlHelperTest.php

+ 1 - 1
src/View/Helper/HtmlHelper.php

@@ -66,7 +66,7 @@ class HtmlHelper extends Helper {
 		'para' => '<p{{attrs}}>{{content}}</p>',
 		'parastart' => '<p{{attrs}}>',
 		'css' => '<link rel="{{rel}}" href="{{url}}"{{attrs}}/>',
-		'style' => '<style type="text/css"{{attrs}}>{{content}}</style>',
+		'style' => '<style{{attrs}}>{{content}}</style>',
 		'charset' => '<meta http-equiv="Content-Type" content="text/html; charset={{charset}}" />',
 		'ul' => '<ul{{attrs}}>{{content}}</ul>',
 		'ol' => '<ol{{attrs}}>{{content}}</ol>',

+ 2 - 2
tests/TestCase/View/Helper/HtmlHelperTest.php

@@ -574,7 +574,7 @@ class HtmlHelperTest extends TestCase {
 
 		$result = $this->Html->css('screen', array('rel' => 'import'));
 		$expected = array(
-			'style' => array('type' => 'text/css'),
+			'<style',
 			'preg:/@import url\(.*css\/screen\.css\);/',
 			'/style'
 		);
@@ -602,7 +602,7 @@ class HtmlHelperTest extends TestCase {
 
 		$result = $this->Html->css('screen', 'import');
 		$expected = array(
-			'style' => array('type' => 'text/css'),
+			'<style',
 			'preg:/@import url\(.*css\/screen\.css\);/',
 			'/style'
 		);