@@ -469,7 +469,7 @@ class Mustache {
* @return string
*/
protected function _renderEscaped($tag_name) {
- return htmlentities($this->_getVariable($tag_name), null, $this->_charset);
+ return htmlentities($this->_getVariable($tag_name), ENT_COMPAT, $this->_charset);
}
/**
@@ -2,6 +2,7 @@
class Simple extends Mustache {
public $name = "Chris";
+ public $last_name = '"Bob"';
public $value = 10000;
public function taxed_value() {
@@ -1,4 +1,4 @@
-Hello {{name}}
+Hello {{name}} {{last_name}}
You have just won ${{value}}!
{{#in_ca}}
Well, ${{ taxed_value }}, after taxes.
@@ -1,3 +1,3 @@
-Hello Chris
+Hello Chris "Bob"
You have just won $10000!
Well, $6000, after taxes.