Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

SmartyException shouldn't output (html)encoded text

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
cmanley
Smarty Rookie


Joined: 13 Jan 2013
Posts: 5

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: 5068
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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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