diff options
| author | Uwe Tews <uwe.tews@googlemail.com> | 2017-08-09 12:20:33 +0200 |
|---|---|---|
| committer | Uwe Tews <uwe.tews@googlemail.com> | 2017-08-09 12:20:33 +0200 |
| commit | 6a257a7ad38ffa17bf49dd73a092a67dd0dab8e7 (patch) | |
| tree | 6d2689adfbaef9589d96d31b01147441939aebc6 /lexer/smarty_internal_templatelexer.plex | |
| parent | 418a1fd443027a35589fe175e29dd02dff8667b2 (diff) | |
| download | smarty-6a257a7ad38ffa17bf49dd73a092a67dd0dab8e7.tar.gz smarty-6a257a7ad38ffa17bf49dd73a092a67dd0dab8e7.tar.bz2 smarty-6a257a7ad38ffa17bf49dd73a092a67dd0dab8e7.zip | |
- improvement repeated delimiter like {{ and }} will be treated as literal
https://groups.google.com/forum/#!topic/smarty-developers/h9r82Bx4KZw
Diffstat (limited to 'lexer/smarty_internal_templatelexer.plex')
| -rw-r--r-- | lexer/smarty_internal_templatelexer.plex | 8 |
1 files changed, 8 insertions, 0 deletions
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 = '<br>'; } + /* + * 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); } |
