mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
remove \r from template source before compiling
This commit is contained in:
@@ -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("<?php\n\$_smarty_tpl->properties['nocache_hash'] = '{$this->nocache_hash}';\n?>\n");
|
||||
|
Reference in New Issue
Block a user