From 8c1f400c09f0eb63c99db215067a662e8758cc72 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Fri, 2 Jan 2015 08:25:27 +0100 Subject: [PATCH] remove \r from template source before compiling --- libs/sysplugins/smarty_internal_smartytemplatecompiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php index cb50b4be..ca9bc669 100644 --- a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php +++ b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php @@ -53,7 +53,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom * array of vars which can be compiled in local scope * * @var array -*/ + */ public $local_var = array(); /** @@ -85,7 +85,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom tags in the templates are replaces with PHP code, then written to compiled files. */ // init the lexer/parser to compile the template - $this->lex = new $this->lexer_class($_content, $this); + $this->lex = new $this->lexer_class(str_replace(array("\r\n", "\r"), "\n", $_content), $this); $this->parser = new $this->parser_class($this->lex, $this); if ($isTemplateSource) { $this->parser->insertPhpCode("properties['nocache_hash'] = '{$this->nocache_hash}';\n?>\n");