|
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 |
cmanley Smarty Rookie
Joined: 13 Jan 2013 Posts: 5
|
Posted: Sun Jan 13, 2013 1:13 am Post subject: SmartyException shouldn't output (html)encoded text |
|
|
...or at least make it user configurable via a define (keeps it backwards compatible if fixed).
Smarty shouldn't just assume HTML is being used as the presentation layer. In fact I'm not. This is why the exception definition below is screwing me around. Unless there's something I missed somewhere, I'm going to have to make an unhtmlentities() function in my application's exception handler for SmartyException based exceptions.
Code: |
/**
* Smarty exception class
* @package Smarty
*/
class SmartyException extends Exception {
public function __construct($message) {
$this->message = htmlentities($message);
}
}
|
I'm using version 3.1-DEV (Debian package).
Edit: posted this message in Google code. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
|
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
|