Bladeren bron

Fix for resetting otag/ctag to initial values between successive renders of same template.

Justin Hileman 15 jaren geleden
bovenliggende
commit
a978b6ba45
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      Mustache.php

+ 6 - 0
Mustache.php

@@ -324,6 +324,9 @@ class Mustache {
 			return $template;
 		}
 
+		$otag_orig = $this->_otag;
+		$ctag_orig = $this->_ctag;
+
 		$otag = preg_quote($this->_otag);
 		$ctag = preg_quote($this->_ctag);
 
@@ -342,6 +345,9 @@ class Mustache {
 			$template = substr($template, $offset + strlen($tag));
 		}
 
+		$this->_otag = $otag_orig;
+		$this->_ctag = $ctag_orig;
+
 		return $html . $template;
 	}