mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
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:
parent
714e06e158
commit
62fd1f2124
1 changed files with 6 additions and 1 deletions
|
|
@ -116,7 +116,8 @@ class HTMLDisplayHandler
|
||||||
if(__DEBUG__==3) $start = getMicroTime();
|
if(__DEBUG__==3) $start = getMicroTime();
|
||||||
|
|
||||||
// move <style ..></style> in body to the header
|
// 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
|
// move <meta ../> in body to the header
|
||||||
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this,'_moveMetaToHeader'), $output);
|
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this,'_moveMetaToHeader'), $output);
|
||||||
|
|
@ -268,6 +269,10 @@ class HTMLDisplayHandler
|
||||||
*/
|
*/
|
||||||
function _moveStyleToHeader($matches)
|
function _moveStyleToHeader($matches)
|
||||||
{
|
{
|
||||||
|
if(isset($matches[1]) && stristr($matches[1], 'scoped'))
|
||||||
|
{
|
||||||
|
return $matches[0];
|
||||||
|
}
|
||||||
Context::addHtmlHeader($matches[0]);
|
Context::addHtmlHeader($matches[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue