새로운 tag 기반의 템플릿 문법의 오류 수정

- cond 조건문에 < 가 있을 경우 에러가 나는 문제
- 중첩 태그 조건절에서 닫는 태그가 남아 있는 문제


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7838 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2010-11-16 01:42:53 +00:00
parent 0415758f61
commit fd3b24f0b2

View file

@ -351,7 +351,8 @@
$next = substr($buff,$pos);
$pre_pos = strrpos($pre, '<');
$next_pos = strpos($next, '<');
$np = strpos($next,'"');
$next_pos = strpos(substr($next,$np), '>')+$np+1;
$tag = substr($pre, $pre_pos). substr($next, 0, $next_pos);
$pre = substr($pre, 0, $pre_pos);
@ -387,7 +388,8 @@
$tmp_buff = substr($next, 0, $close_pos+strlen('</'.$tag_name.'>'));
$tag .= $tmp_buff;
$next = substr($next, strlen($tmp_buff));
if(false === strpos($tmp_buff, '<'.$tag_name)) break;
if(substr_count($tag, '<'.$tag_name) == substr_count($tag,'</'.$tag_name)) break;
}
$buff = $pre.$tag_head.$tag.$tag_tail.$next;
}