if scoped attribute in style tag, do not move to header

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12507 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2013-01-03 02:41:09 +00:00
parent 714e06e158
commit 62fd1f2124

View file

@ -116,7 +116,8 @@ class HTMLDisplayHandler
if(__DEBUG__==3) $start = getMicroTime();
// move <style ..></style> in body to the header
$output = preg_replace_callback('!<style(.*?)<\/style>!is', array($this,'_moveStyleToHeader'), $output);
//$output = preg_replace_callback('!<style(.*?)<\/style>!is', array($this,'_moveStyleToHeader'), $output);
$output = preg_replace_callback('!<style(.*?)>(.*?)<\/style>!is', array($this,'_moveStyleToHeader'), $output);
// move <meta ../> in body to the header
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this,'_moveMetaToHeader'), $output);
@ -268,6 +269,10 @@ class HTMLDisplayHandler
*/
function _moveStyleToHeader($matches)
{
if(isset($matches[1]) && stristr($matches[1], 'scoped'))
{
return $matches[0];
}
Context::addHtmlHeader($matches[0]);
}