From 6a257a7ad38ffa17bf49dd73a092a67dd0dab8e7 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Wed, 9 Aug 2017 12:20:33 +0200 Subject: - improvement repeated delimiter like {{ and }} will be treated as literal https://groups.google.com/forum/#!topic/smarty-developers/h9r82Bx4KZw --- lexer/smarty_internal_templatelexer.plex | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lexer/smarty_internal_templatelexer.plex') diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index cb2ec22e..51408b77 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -255,6 +255,14 @@ class Smarty_Internal_Templatelexer $this->yyTraceFILE = fopen('php://output', 'w'); $this->yyTracePrompt = '
'; } + /* + * Check if this tag is autoliteral + */ + public function isAutoLiteral () + { + return $this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false; + } + public function replace ($input) { return str_replace(array('SMARTYldel','SMARTYrawldel','SMARTYrdel'),array($this->ldel,$this->pldel,$this->rdel),$input); } -- cgit v1.3