mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
link tag move to header
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12509 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
62fd1f2124
commit
9fdff42e6c
1 changed files with 14 additions and 1 deletions
|
|
@ -116,9 +116,11 @@ 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 <link ..></link> in body to the header
|
||||||
|
$output = preg_replace_callback('!<link(.*?)/>!is', array($this,'_moveLinkToHeader'), $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);
|
||||||
|
|
||||||
|
|
@ -276,6 +278,17 @@ class HTMLDisplayHandler
|
||||||
Context::addHtmlHeader($matches[0]);
|
Context::addHtmlHeader($matches[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add html link code extracted from html body to Context, which will be
|
||||||
|
* printed inside <header></header> later.
|
||||||
|
* @param array $matches
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function _moveLinkToHeader($matches)
|
||||||
|
{
|
||||||
|
Context::addHtmlHeader($matches[0]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add meta code extracted from html body to Context, which will be
|
* add meta code extracted from html body to Context, which will be
|
||||||
* printed inside <header></header> later.
|
* printed inside <header></header> later.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue