From f074a20ed53ee45cff2a19c42007ec9d8133d897 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Fri, 5 Apr 2013 22:19:13 +0000 Subject: [PATCH] - bugfix after the fix for Issue #130 compiler exceptions got double escaped (Forum Topic 24199) --- change_log.txt | 1 + libs/sysplugins/smarty_internal_compile_block.php | 2 +- libs/sysplugins/smarty_internal_templatecompilerbase.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index b4fb593a..36e91cc5 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 05.04.2013 - bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094) +- bugfix after the fix for Issue #130 compiler exceptions got double escaped (Forum Topic 24199) 28.02.2013 - bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133) diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index 9fa6685a..847b04a9 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -84,7 +84,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase { $al = ''; } if (0 == preg_match("!({$_ldl}{$al}block\s+)(name=)?(\w+|'.*'|\".*\")(\s*?)?((append|prepend|nocache)?(\s*)?(hide)?)?(\s*{$_rdl})!", $block_tag, $_match)) { - $error_text = 'Syntax Error in template "' . $template->source->filepath . '" "' . htmlspecialchars($block_tag) . '" illegal options'; + $error_text = 'Syntax Error in template "' . $template->source->filepath . '" "' . $block_tag . '" illegal options'; throw new SmartyCompilerException($error_text); } else { $_name = trim($_match[3], '\'"'); diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 373824ac..0928d80d 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -643,7 +643,7 @@ abstract class Smarty_Internal_TemplateCompilerBase { $line = $this->lex->line; } $match = preg_split("/\n/", $this->lex->data); - $error_text = 'Syntax Error in template "' . $this->template->source->filepath . '" on line ' . $line . ' "' . htmlspecialchars(trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1]))) . '" '; + $error_text = 'Syntax Error in template "' . $this->template->source->filepath . '" on line ' . $line . ' "' . trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1])) . '" '; if (isset($args)) { // individual error message $error_text .= $args;