Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
SmartyException shouldn't output (html)encoded text

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
cmanley
Smarty n00b


Joined: 13 Jan 2013
Posts: 3

PostPosted: Sun Jan 13, 2013 1:13 am    Post subject: SmartyException shouldn't output (html)encoded text Reply with quote

...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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4509
Location: Hamburg / Germany

PostPosted: Sun Jan 13, 2013 5:37 pm    Post subject: Reply with quote

See http://code.google.com/p/smarty-php/issues/detail?id=130
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP