mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
remove \r from template source before compiling
This commit is contained in:
@@ -85,7 +85,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
|
|||||||
tags in the templates are replaces with PHP code,
|
tags in the templates are replaces with PHP code,
|
||||||
then written to compiled files. */
|
then written to compiled files. */
|
||||||
// init the lexer/parser to compile the template
|
// 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);
|
$this->parser = new $this->parser_class($this->lex, $this);
|
||||||
if ($isTemplateSource) {
|
if ($isTemplateSource) {
|
||||||
$this->parser->insertPhpCode("<?php\n\$_smarty_tpl->properties['nocache_hash'] = '{$this->nocache_hash}';\n?>\n");
|
$this->parser->insertPhpCode("<?php\n\$_smarty_tpl->properties['nocache_hash'] = '{$this->nocache_hash}';\n?>\n");
|
||||||
|
Reference in New Issue
Block a user