mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 05:39:58 +09:00
외부링크 이미지의 썸네일 추출시 이미지 파일 검사를 하지 않아서 동영상등에 대해서 외부파일을 다운받으려 해서 메모리 허용치 초과 오류를 내는 문제 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6407 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e57019217f
commit
d594af2694
1 changed files with 2 additions and 1 deletions
|
|
@ -556,7 +556,8 @@
|
|||
preg_match_all("!src=(\"|')([^\"' ]*?)(\"|')!is", $content, $matches, PREG_SET_ORDER);
|
||||
$cnt = count($matches);
|
||||
for($i=0;$i<$cnt;$i++) {
|
||||
$target_src = $matches[$i][2];
|
||||
$target_src = trim($matches[$i][2]);
|
||||
if(!preg_match("/\.(jpg|png|jpeg|gif|bmp)$/i",$target_src)) continue;
|
||||
if(preg_match('/\/(common|modules|widgets|addons|layouts)\//i', $target_src)) continue;
|
||||
else {
|
||||
if(!preg_match('/^(http|https):\/\//i',$target_src)) $target_src = Context::getRequestUri().$target_src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue