|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Hpatoio Smarty Rookie
Joined: 29 Apr 2003 Posts: 25 Location: Italy
|
Posted: Wed Dec 13, 2006 2:23 pm Post subject: Outputfilter executed twice |
|
|
Hello.
I've extended Smarty in my framework.
Here the display method
Code: | ...
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER ['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
$this->register_outputfilter(array($this,'ajax_encode'));
}
parent::display($resource_name, $cache_id, $compile_id);
... |
ajax_encode is another method
Code: | function ajax_encode($string) {
return utf8_encode($string);
} |
Things works well but not always.
If in my template I've a plugin that fetch another template the html of the fetched template is passed twice through the filter and so is encoded twice.
This results in a bad encoding.
Is there a way to avoid this ?
Am I doing something wrong or is this a bug ?
Simone |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|