From 73c7b32c8381d30213440036c0ba1ef9aaa2ea3d Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Sun, 13 Jan 2013 21:13:14 +0000 Subject: [PATCH] 13.01.2013 - enhancement allow to disable exception message escaping by SmartyException::$escape = false; (Issue #130) --- change_log.txt | 3 +++ libs/Smarty.class.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index a69b9654..8527ab45 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +13.01.2013 +- enhancement allow to disable exception message escaping by SmartyException::$escape = false; (Issue #130) + 09.01.2013 - bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966) - bugfix template inheritance could fail if nested {block} tags in childs did contain {$smarty.block.child} (Issue #127) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ccececae..af99a23c 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1488,8 +1488,9 @@ if (Smarty::$_CHARSET !== 'UTF-8') { * @package Smarty */ class SmartyException extends Exception { + public static $escape = true; public function __construct($message) { - $this->message = htmlentities($message); + $this->message = self::$escape ? htmlentities($message) : $message; } }