mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 20:41:16 +02:00
Fix issue processwire/processwire-issues#166
This commit is contained in:
@@ -410,12 +410,13 @@ class WireMarkupRegions extends Wire {
|
|||||||
// multiple close tags present, must figure out which is the right one
|
// multiple close tags present, must figure out which is the right one
|
||||||
$testStart = 0;
|
$testStart = 0;
|
||||||
$doCnt = 0;
|
$doCnt = 0;
|
||||||
$openTag = "<$tagInfo[name] ";
|
$openTag1 = "<$tagInfo[name]>";
|
||||||
|
$openTag2 = "<$tagInfo[name] ";
|
||||||
do {
|
do {
|
||||||
$doCnt++;
|
$doCnt++;
|
||||||
$testPos = stripos($region, $tagInfo['close'], $testStart);
|
$testPos = stripos($region, $tagInfo['close'], $testStart);
|
||||||
$test = substr($region, 0, $testPos);
|
$test = substr($region, 0, $testPos);
|
||||||
$openCnt = substr_count($test, $openTag);
|
$openCnt = substr_count($test, $openTag1) + substr_count($test, $openTag2);
|
||||||
$closeCnt = substr_count($test, $tagInfo['close']);
|
$closeCnt = substr_count($test, $tagInfo['close']);
|
||||||
if($openCnt == $closeCnt) {
|
if($openCnt == $closeCnt) {
|
||||||
// open and close tags balance, meaning we've found our region
|
// open and close tags balance, meaning we've found our region
|
||||||
|
Reference in New Issue
Block a user