openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit 5f0505b8253afdab0855c6417d052216f612dcdb
parent b602970d84cce34c55087ed974da52849a023559
Author: Jan Dankert <develop@jandankert.de>
Date:   Tue, 12 Nov 2019 00:17:33 +0100

Fix: Parse partials from the beginning.

Diffstat:
modules/util/Mustache.class.php | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/util/Mustache.class.php b/modules/util/Mustache.class.php @@ -148,6 +148,7 @@ class Mustache } $source = substr_replace($source,'',$begin,$end-$begin+strlen($closTag)); // Delimiter-Tag is not added to the taglist, we don't need it. + $pos = $begin; } elseif ( $tag->type == MustacheTag::PARTIAL ) { if ( !is_callable($this->partialLoader) ) @@ -157,13 +158,14 @@ class Mustache $partialSource = $loader( $tag->propertyName ); $source = substr_replace($source,$partialSource,$begin,$end-$begin+strlen($closTag)); // Partial-Tag is not added to the taglist, we don't need it. + $pos = $begin; } else { // All other tags are added to our list. $tagList[] = $tag; + $pos = $end + strlen($closTag); } - $pos = $end + strlen($closTag); //$source = substr($source,0,$begin-1).substr($source,$end+1); }