mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
- unclosed block tag in double quted string must throw compiler exception.
https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
12.10.2017
|
||||
- bugfix $smarty.block.child and $smarty.block.parent could not be used like any
|
||||
$smarty special variable https://github.com/smarty-php/smarty/issues/393
|
||||
- unclosed block tag in double quoted string must throw compiler exception.
|
||||
https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
|
||||
|
||||
07.10.2017
|
||||
- bugfix modification of 9.8.2017 did fail on some recursive
|
||||
|
@@ -510,6 +510,7 @@ class Smarty_Internal_Templatelexer
|
||||
double_quote {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
|
||||
$this->compiler->enterDoubleQuote();
|
||||
}
|
||||
singlequotestring {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
|
||||
@@ -693,6 +694,7 @@ class Smarty_Internal_Templatelexer
|
||||
double_quote {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||
$this->yypopstate();
|
||||
$this->compiler->leaveDoubleQuote();
|
||||
}
|
||||
backtick dollar {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
||||
|
@@ -135,7 +135,7 @@ class Smarty_Internal_Templateparser
|
||||
public $template_prefix = array();
|
||||
|
||||
/**
|
||||
* security object
|
||||
* template prefix array
|
||||
*
|
||||
* @var \Smarty_Internal_ParseTree[]
|
||||
*/
|
||||
|
@@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.32-dev-24';
|
||||
const SMARTY_VERSION = '3.1.32-dev-25';
|
||||
|
||||
/**
|
||||
* define variable scopes
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -260,7 +260,6 @@ class Smarty_Internal_Templatelexer
|
||||
$literals[ $key ] = preg_quote($literal, '/');
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->smarty->auto_literal) {
|
||||
$literals[] = $this->ldel . '{1,}\\s+';
|
||||
}
|
||||
@@ -374,7 +373,6 @@ class Smarty_Internal_Templatelexer
|
||||
if ($this->counter >= $this->dataLength) {
|
||||
return false; // end of input
|
||||
}
|
||||
|
||||
do {
|
||||
if (preg_match($this->yy_global_pattern1, $this->data, $yymatches, 0, $this->counter)) {
|
||||
if (!isset($yymatches[ 0 ][ 1 ])) {
|
||||
@@ -485,7 +483,6 @@ class Smarty_Internal_Templatelexer
|
||||
if ($this->counter >= $this->dataLength) {
|
||||
return false; // end of input
|
||||
}
|
||||
|
||||
do {
|
||||
if (preg_match($this->yy_global_pattern2, $this->data, $yymatches, 0, $this->counter)) {
|
||||
if (!isset($yymatches[ 0 ][ 1 ])) {
|
||||
@@ -618,7 +615,6 @@ class Smarty_Internal_Templatelexer
|
||||
if ($this->counter >= $this->dataLength) {
|
||||
return false; // end of input
|
||||
}
|
||||
|
||||
do {
|
||||
if (preg_match($this->yy_global_pattern3, $this->data, $yymatches, 0, $this->counter)) {
|
||||
if (!isset($yymatches[ 0 ][ 1 ])) {
|
||||
@@ -678,6 +674,7 @@ class Smarty_Internal_Templatelexer
|
||||
{
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
|
||||
$this->compiler->enterDoubleQuote();
|
||||
}
|
||||
|
||||
function yy_r3_4()
|
||||
@@ -906,7 +903,6 @@ class Smarty_Internal_Templatelexer
|
||||
if ($this->counter >= $this->dataLength) {
|
||||
return false; // end of input
|
||||
}
|
||||
|
||||
do {
|
||||
if (preg_match($this->yy_global_pattern4, $this->data, $yymatches, 0, $this->counter)) {
|
||||
if (!isset($yymatches[ 0 ][ 1 ])) {
|
||||
@@ -989,7 +985,6 @@ class Smarty_Internal_Templatelexer
|
||||
if ($this->counter >= $this->dataLength) {
|
||||
return false; // end of input
|
||||
}
|
||||
|
||||
do {
|
||||
if (preg_match($this->yy_global_pattern5, $this->data, $yymatches, 0, $this->counter)) {
|
||||
if (!isset($yymatches[ 0 ][ 1 ])) {
|
||||
@@ -1071,6 +1066,7 @@ class Smarty_Internal_Templatelexer
|
||||
{
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||
$this->yypopstate();
|
||||
$this->compiler->leaveDoubleQuote();
|
||||
}
|
||||
|
||||
function yy_r5_8()
|
||||
@@ -1095,7 +1091,6 @@ class Smarty_Internal_Templatelexer
|
||||
{
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user