mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 12:14:12 +02:00
- bugfix <?xml ... ?> including template variables broken since 3.1.22 https://github.com/smarty-php/smarty/issues/47
This commit is contained in:
@@ -106,7 +106,9 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
|
||||
$lex->taglineno = $lex->line;
|
||||
$closeTag = '?>';
|
||||
if (strpos($lex->value, '<?xml') === 0) {
|
||||
$lex->phpType = 'xml';
|
||||
$lex->is_xml = true;
|
||||
$lex->token = Smarty_Internal_Templateparser::TP_NOCACHE;
|
||||
return;
|
||||
} elseif (strpos($lex->value, '<?') === 0) {
|
||||
$lex->phpType = 'php';
|
||||
} elseif (strpos($lex->value, '<%') === 0) {
|
||||
@@ -115,6 +117,11 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
|
||||
} elseif (strpos($lex->value, '%>') === 0) {
|
||||
$lex->phpType = 'unmatched';
|
||||
} elseif (strpos($lex->value, '?>') === 0) {
|
||||
if ($lex->is_xml) {
|
||||
$lex->is_xml = false;
|
||||
$lex->token = Smarty_Internal_Templateparser::TP_NOCACHE;
|
||||
return;
|
||||
}
|
||||
$lex->phpType = 'unmatched';
|
||||
} elseif (strpos($lex->value, '<s') === 0) {
|
||||
$lex->phpType = 'script';
|
||||
|
||||
Reference in New Issue
Block a user