From a978b6ba451eb9b87f728f840e000159e5291188 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Fri, 11 Jun 2010 16:29:59 -0400 Subject: [PATCH] Fix for resetting otag/ctag to initial values between successive renders of same template. --- Mustache.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mustache.php b/Mustache.php index 6d798ef..1d06bec 100644 --- a/Mustache.php +++ b/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; }