mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 18:04:26 +02:00
- bugfix some custom left and right delimiters like '{^' '^}' did not work
https://github.com/smarty-php/smarty/issues/450 https://github.com/smarty-php/smarty/pull/482
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
===== 3.1.33-dev-10 =====
|
||||
31.08.2018
|
||||
- bugfix some custom left and right delimiters like '{^' '^}' did not work
|
||||
https://github.com/smarty-php/smarty/issues/450 https://github.com/smarty-php/smarty/pull/482
|
||||
|
||||
- reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483
|
||||
|
||||
- bugfix on Windows absolute filepathes did fail if the drive letter was followed by a linux DIRECTORY_SEPARATOR
|
||||
|
@@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.33-dev-10';
|
||||
const SMARTY_VERSION = '3.1.33-dev-11';
|
||||
/**
|
||||
* define variable scopes
|
||||
*/
|
||||
|
@@ -1212,20 +1212,20 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
$this->ldelLength = strlen($ldel);
|
||||
$this->ldelPreg = '';
|
||||
foreach (str_split($ldel, 1) as $chr) {
|
||||
$this->ldelPreg .= '[' . ($chr === '\\' ? '\\' : '') . $chr . ']';
|
||||
$this->ldelPreg .= '[' . preg_quote($chr,'/') . ']';
|
||||
}
|
||||
$rdel = $this->smarty->getRightDelimiter();
|
||||
$this->rdelLength = strlen($rdel);
|
||||
$this->rdelPreg = '';
|
||||
foreach (str_split($rdel, 1) as $chr) {
|
||||
$this->rdelPreg .= '[' . ($chr === '\\' ? '\\' : '') . $chr . ']';
|
||||
$this->rdelPreg .= '[' . preg_quote($chr,'/') . ']';
|
||||
}
|
||||
$literals = $this->smarty->getLiterals();
|
||||
if (!empty($literals)) {
|
||||
foreach ($literals as $key => $literal) {
|
||||
$literalPreg = '';
|
||||
foreach (str_split($literal, 1) as $chr) {
|
||||
$literalPreg .= '[' . ($chr === '\\' ? '\\' : '') . $chr . ']';
|
||||
$literalPreg .= '[' . preg_quote($chr,'/') . ']';
|
||||
}
|
||||
$literals[ $key ] = $literalPreg;
|
||||
}
|
||||
|
Reference in New Issue
Block a user