Jeremy Bush 15 роки тому
батько
коміт
758027bd91

+ 1 - 1
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);
 	}
 
 	/**

+ 1 - 0
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() {

+ 1 - 1
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.

+ 1 - 1
examples/simple/simple.txt

@@ -1,3 +1,3 @@
-Hello Chris
+Hello Chris "Bob"
 You have just won $10000!
 Well, $6000, after taxes.