[PHPTAL] Recommendation for the dynamic definition data encoding in
source of template.
CREATIVE0809
trance_creative at mail.ru
Thu Apr 23 16:23:07 CEST 2009
--- a/State.php
+++ b/State.php
@@ -109,7 +109,7 @@ class PHPTAL_Php_State
}
private function _interpolateTalesVarsEscaped($matches) {
- return '<?php echo phptal_escape('.phptal_tale($matches[1]).', ENT_QUOTES, \''.$this->_encoding.'\');?>';
+ return '<?php echo phptal_escape('.phptal_tale($matches[1]).', ENT_QUOTES, $tpl->getEncoding());?>';
}
public function interpolateTalesVarsInHtml($src)
@@ -140,7 +140,7 @@ class PHPTAL_Php_State
public function htmlchars($php)
{
- return 'phptal_escape('.$php.', ENT_QUOTES, \''.$this->_encoding.'\')';
+ return 'phptal_escape('.$php.', ENT_QUOTES, $tpl->getEncoding())';
}
private $_debug;
More information about the PHPTAL
mailing list