mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 12:22:15 +09:00
issue 1886 return origin code when src value include variable.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10918 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
53175d7c1e
commit
2c5c1fe8f5
1 changed files with 11 additions and 1 deletions
|
|
@ -199,7 +199,11 @@ class TemplateHandler {
|
|||
$buff = preg_replace('@</?block\s*>@is','',$buff);
|
||||
|
||||
// form auto generation
|
||||
$buff = preg_replace_callback('/(<form(?:<\?php.+?\?>|[^<>]+)*?>)(.*?)(<\/form>)/is', array($this, '_compileFormAuthGeneration'), $buff);
|
||||
$temp = preg_replace_callback('/(<form(?:<\?php.+?\?>|[^<>]+)*?>)(.*?)(<\/form>)/is', array($this, '_compileFormAuthGeneration'), $buff);
|
||||
if($temp)
|
||||
{
|
||||
$buff = $temp;
|
||||
}
|
||||
|
||||
// prevent from calling directly before writing into file
|
||||
$buff = '<?php if(!defined("__XE__"))exit;?>'.$buff;
|
||||
|
|
@ -319,6 +323,12 @@ class TemplateHandler {
|
|||
**/
|
||||
function _replacePath($match)
|
||||
{
|
||||
//return origin code when src value include variable.
|
||||
if(preg_match('/^[\'|"]\s*\.\s*\$/', $match[1]))
|
||||
{
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
$src = preg_replace('@^(\./)+@', '', trim($match[1]));
|
||||
|
||||
$src = $this->web_path.$src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue