#19780880 cond attribute in tag, not parsed

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8415 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-06-01 02:38:19 +00:00
parent ab0421cd81
commit 0678de9512

View file

@ -357,9 +357,16 @@
$pre_pos = strrpos($pre, '<');
$isClosedTagUse = true;
preg_match('/<(\/|[a-z])/i',$next,$m);
// if not use closed tag, find simple closed tag
if(!$m[0]) {
$isClosedTagUse = false;
preg_match('/\/>/',$next,$m);
}
if(!$m[0]) return $buff;
$next_pos = strpos($next, $m[0]);
if($isClosedTagUse) $next_pos = strpos($next, $m[0]);
else $next_pos = strpos($next, $m[0])+2;
$tag = substr($pre, $pre_pos). substr($next, 0, $next_pos);
$pre = substr($pre, 0, $pre_pos);