diff --git a/Mustache.php b/Mustache.php index 414316f..df52755 100644 --- a/Mustache.php +++ b/Mustache.php @@ -617,7 +617,7 @@ class Mustache { * @return string */ protected function _renderEscaped($tag_name, $leading, $trailing) { - return $leading . htmlentities($this->_renderUnescaped($tag_name), ENT_COMPAT, $this->_charset) . $trailing; + return htmlentities($this->_renderUnescaped($tag_name, $leading, $trailing), ENT_COMPAT, $this->_charset); } /** @@ -888,4 +888,4 @@ class MustacheException extends Exception { // which can't be handled by this Mustache instance. const UNKNOWN_PRAGMA = 4; -} \ No newline at end of file +}