diff --git a/Mustache.php b/Mustache.php index 2b7551c..60e66c8 100644 --- a/Mustache.php +++ b/Mustache.php @@ -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); } /** diff --git a/examples/simple/Simple.php b/examples/simple/Simple.php index 6d07dac..86b5674 100644 --- a/examples/simple/Simple.php +++ b/examples/simple/Simple.php @@ -2,6 +2,7 @@ class Simple extends Mustache { public $name = "Chris"; + public $last_name = '"Bob"'; public $value = 10000; public function taxed_value() { diff --git a/examples/simple/simple.mustache b/examples/simple/simple.mustache index 03df206..4b73537 100644 --- a/examples/simple/simple.mustache +++ b/examples/simple/simple.mustache @@ -1,4 +1,4 @@ -Hello {{name}} +Hello {{name}} {{last_name}} You have just won ${{value}}! {{#in_ca}} Well, ${{ taxed_value }}, after taxes. diff --git a/examples/simple/simple.txt b/examples/simple/simple.txt index 5d75d65..a7c7b13 100644 --- a/examples/simple/simple.txt +++ b/examples/simple/simple.txt @@ -1,3 +1,3 @@ -Hello Chris +Hello Chris "Bob" You have just won $10000! Well, $6000, after taxes.