@@ -56,7 +56,7 @@ public function getCompileValues()
5656 array (
5757 "\nclass Monkey extends Mustache_Template " ,
5858 '$value = $this->resolveValue($context->find( \'name \'), $context); ' ,
59- '$buffer .= $indent . call_user_func($this->mustache->getEscape(), $value); ' ,
59+ '$buffer .= $indent . ($value === null ? \'\' : call_user_func($this->mustache->getEscape(), $value) ); ' ,
6060 'return $buffer; ' ,
6161 ),
6262 ),
@@ -76,7 +76,7 @@ public function getCompileValues()
7676 array (
7777 "\nclass Monkey extends Mustache_Template " ,
7878 '$value = $this->resolveValue($context->find( \'name \'), $context); ' ,
79- '$buffer .= $indent . htmlspecialchars($value, ' . ENT_COMPAT . ', \'ISO-8859-1 \'); ' ,
79+ '$buffer .= $indent . ($value === null ? \'\' : htmlspecialchars($value, ' . ENT_COMPAT . ', \'ISO-8859-1 \') ); ' ,
8080 'return $buffer; ' ,
8181 ),
8282 ),
@@ -96,7 +96,7 @@ public function getCompileValues()
9696 array (
9797 "\nclass Monkey extends Mustache_Template " ,
9898 '$value = $this->resolveValue($context->find( \'name \'), $context); ' ,
99- '$buffer .= $indent . htmlspecialchars($value, ' . ENT_QUOTES . ', \'ISO-8859-1 \'); ' ,
99+ '$buffer .= $indent . ($value === null ? \'\' : htmlspecialchars($value, ' . ENT_QUOTES . ', \'ISO-8859-1 \') ); ' ,
100100 'return $buffer; ' ,
101101 ),
102102 ),
@@ -123,7 +123,7 @@ public function getCompileValues()
123123 "\nclass Monkey extends Mustache_Template " ,
124124 "\$buffer .= \$indent . 'foo \n'; " ,
125125 '$value = $this->resolveValue($context->find( \'name \'), $context); ' ,
126- '$buffer .= htmlspecialchars($value, ' . ENT_COMPAT . ', \'UTF-8 \'); ' ,
126+ '$buffer .= ($value === null ? \'\' : htmlspecialchars($value, ' . ENT_COMPAT . ', \'UTF-8 \') ); ' ,
127127 '$value = $this->resolveValue($context->last(), $context); ' ,
128128 '$buffer .= \'\\\'bar \\\'\'; ' ,
129129 'return $buffer; ' ,
0 commit comments