mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 23:59:57 +09:00
issue 746: Fixed a bug for rewriting image URL
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9932 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c26a638822
commit
59370973bd
2 changed files with 6 additions and 1 deletions
|
|
@ -301,7 +301,7 @@ class TemplateHandler {
|
||||||
$src = str_replace('/./', '/', $src);
|
$src = str_replace('/./', '/', $src);
|
||||||
|
|
||||||
// for backward compatibility
|
// for backward compatibility
|
||||||
$src = preg_replace('@((?:[\w-]+/)+)\1@', '\1', $src);
|
$src = preg_replace('@/((?:[\w-]+/)+)\1@', '/\1', $src);
|
||||||
|
|
||||||
while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src))!==$src) $src = $tmp;
|
while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src))!==$src) $src = $tmp;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,11 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase
|
||||||
"<li <!--@if(in_array(\$act, array(\n'dispNmsAdminGroupList',\n'dispNmsAdminInsertGroup',\n'dispNmsAdminGroupInfo',\n'dispNmsAdminDeleteGroup')))-->class=\"on\"<!--@endif-->>",
|
"<li <!--@if(in_array(\$act, array(\n'dispNmsAdminGroupList',\n'dispNmsAdminInsertGroup',\n'dispNmsAdminGroupInfo',\n'dispNmsAdminDeleteGroup')))-->class=\"on\"<!--@endif-->>",
|
||||||
"<li <?php if(in_array(\$__Context->act, array(\n'dispNmsAdminGroupList',\n'dispNmsAdminInsertGroup',\n'dispNmsAdminGroupInfo',\n'dispNmsAdminDeleteGroup'))){ ?>class=\"on\"<?php } ?>>"
|
"<li <?php if(in_array(\$__Context->act, array(\n'dispNmsAdminGroupList',\n'dispNmsAdminInsertGroup',\n'dispNmsAdminGroupInfo',\n'dispNmsAdminDeleteGroup'))){ ?>class=\"on\"<?php } ?>>"
|
||||||
),
|
),
|
||||||
|
// issue 746
|
||||||
|
array(
|
||||||
|
'<img src="../myxe/xe/img.png" />',
|
||||||
|
'<img src="/xe/tests/classes/myxe/xe/img.png" />'
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue