mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
- enhancement remove BOM automatically from template source (topic 25161)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== 3.1.20-dev ===== (xx.xx.2014)
|
===== 3.1.20-dev ===== (xx.xx.2014)
|
||||||
|
16.07.2014
|
||||||
|
- enhancement remove BOM automatically from template source (topic 25161)
|
||||||
|
|
||||||
04.07.2014
|
04.07.2014
|
||||||
- bugfix the bufix of 02.06.2014 broke correct handling of child templates with same name but different template folders in extends resource (issue 194 and topic 25099)
|
- bugfix the bufix of 02.06.2014 broke correct handling of child templates with same name but different template folders in extends resource (issue 194 and topic 25099)
|
||||||
|
|
||||||
|
@@ -33,6 +33,9 @@ class Smarty_Internal_Configfilelexer
|
|||||||
self::instance($this);
|
self::instance($this);
|
||||||
$this->data = $data . "\n"; //now all lines are \n-terminated
|
$this->data = $data . "\n"; //now all lines are \n-terminated
|
||||||
$this->counter = 0;
|
$this->counter = 0;
|
||||||
|
if (preg_match('/\xEF\xBB\xBF/', $this->data, $match)) {
|
||||||
|
$this->counter += strlen($match[0]);
|
||||||
|
}
|
||||||
$this->line = 1;
|
$this->line = 1;
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
$this->smarty = $compiler->smarty;
|
$this->smarty = $compiler->smarty;
|
||||||
|
@@ -82,6 +82,9 @@ class Smarty_Internal_Templatelexer
|
|||||||
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
|
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
$this->counter = 0;
|
$this->counter = 0;
|
||||||
|
if (preg_match('/\xEF\xBB\xBF/', $this->data, $match)) {
|
||||||
|
$this->counter += strlen($match[0]);
|
||||||
|
}
|
||||||
$this->line = 1;
|
$this->line = 1;
|
||||||
$this->smarty = $compiler->smarty;
|
$this->smarty = $compiler->smarty;
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
|
@@ -2662,7 +2662,8 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
|
|||||||
if (isset(self::$yyExpectedTokens[$nextstate])) {
|
if (isset(self::$yyExpectedTokens[$nextstate])) {
|
||||||
$expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
|
$expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
|
||||||
if (in_array($token,
|
if (in_array($token,
|
||||||
self::$yyExpectedTokens[$nextstate], true)) {
|
self::$yyExpectedTokens[$nextstate], true)
|
||||||
|
) {
|
||||||
$this->yyidx = $yyidx;
|
$this->yyidx = $yyidx;
|
||||||
$this->yystack = $stack;
|
$this->yystack = $stack;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user