mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 14:19:58 +09:00
merge from 1.5.2
git-svn-id: http://xe-core.googlecode.com/svn/trunk@10446 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6c23751ef8
commit
c727926d9e
382 changed files with 6855 additions and 3603 deletions
|
|
@ -157,8 +157,7 @@
|
|||
@include($path);
|
||||
$content = ob_get_clean();
|
||||
// Replace relative path to the absolute path
|
||||
$path_info = pathinfo($path);
|
||||
$this->path = str_replace('\\', '/', realpath($path_info['dirname'])).'/';
|
||||
$this->path = str_replace('\\', '/', realpath(dirname($path))) . '/';
|
||||
$content = preg_replace_callback('/(target=|src=|href=|url\()("|\')?([^"\'\)]+)("|\'\))?/is',array($this,'_replacePath'),$content);
|
||||
$content = preg_replace_callback('/(<!--%import\()(\")([^"]+)(\")/is',array($this,'_replacePath'),$content);
|
||||
|
||||
|
|
@ -186,7 +185,7 @@
|
|||
$val = trim($matches[3]);
|
||||
// Pass if the path is external or starts with /, #, { characters
|
||||
// /=absolute path, #=hash in a page, {=Template syntax
|
||||
if(preg_match('@^((?:http|https|ftp|telnet|mms)://|(?:mailto|javascript):|[/#{])@i',$val)) {
|
||||
if(strpos($val, '.') === FALSE || preg_match('@^((?:http|https|ftp|telnet|mms)://|(?:mailto|javascript):|[/#{])@i',$val)) {
|
||||
return $matches[0];
|
||||
// In case of .. , get a path
|
||||
} elseif(preg_match('/^\.\./i',$val)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue