- bugfix after the fix for Issue #130 compiler exceptions got double escaped (Forum Topic 24199)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-04-05 22:19:13 +00:00
parent 58f2227cce
commit f074a20ed5
3 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
===== trunk ===== ===== trunk =====
05.04.2013 05.04.2013
- bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094) - 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 28.02.2013
- bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133) - bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)

View File

@@ -84,7 +84,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
$al = ''; $al = '';
} }
if (0 == preg_match("!({$_ldl}{$al}block\s+)(name=)?(\w+|'.*'|\".*\")(\s*?)?((append|prepend|nocache)?(\s*)?(hide)?)?(\s*{$_rdl})!", $block_tag, $_match)) { 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); throw new SmartyCompilerException($error_text);
} else { } else {
$_name = trim($_match[3], '\'"'); $_name = trim($_match[3], '\'"');

View File

@@ -643,7 +643,7 @@ abstract class Smarty_Internal_TemplateCompilerBase {
$line = $this->lex->line; $line = $this->lex->line;
} }
$match = preg_split("/\n/", $this->lex->data); $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)) { if (isset($args)) {
// individual error message // individual error message
$error_text .= $args; $error_text .= $args;