Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -N -r16245 -r16270 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16245) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16270) @@ -1,6 +1,6 @@ InitParser(); + + $this->Parser->Clear(); $this->HTML = $this->Parser->Run($this->GetVar('t')); } Index: branches/5.2.x/core/kernel/nparser/nparser.php =================================================================== diff -u -N -r16036 -r16270 --- branches/5.2.x/core/kernel/nparser/nparser.php (.../nparser.php) (revision 16036) +++ branches/5.2.x/core/kernel/nparser/nparser.php (.../nparser.php) (revision 16270) @@ -1,6 +1,6 @@ CachingEnabled = !$this->Application->isAdmin && $this->Application->ConfigValue('SystemTagCache') && $this->Application->isCachingType(CACHING_TYPE_MEMORY); } + function Clear() + { + // Discard any half-parsed content. + ob_clean(); + + $this->Stack = array(); + $this->Level = 0; + + $this->Buffers = array(); + $this->InsideComment = false; + + $this->SkipComments = true; + + $this->Params = array(); + $this->ParamsStack = array(); + $this->ParamsLevel = 0; + + $this->Definitions = ''; + + $this->Elements = array(); + + $this->ElementLocations = array(); + + $this->DataExists = false; + + $this->TemplateName = null; + $this->TempalteFullPath = null; + + $this->CachePointers = array(); + $this->Cachable = array(); + + $this->CacheLevel = 0; + + $this->FullCachePage = false; + + $this->PrefixesInUse = array(); + + $this->Captures = array(); + } + function Compile($pre_parsed, $template_name = 'unknown') { $data = file_get_contents($pre_parsed['tname']);