diff options
| author | Uwe Tews <uwe.tews@googlemail.com> | 2015-06-27 15:35:27 +0200 |
|---|---|---|
| committer | Uwe Tews <uwe.tews@googlemail.com> | 2015-06-27 15:35:27 +0200 |
| commit | 3239a194359d0579deac5aba5e060e248fec3ef0 (patch) | |
| tree | ee4b4ce5680bdbc6812d6a0b5421f748376536c1 /lexer/smarty_internal_templatelexer.plex | |
| parent | 6b875397a5f561532e719db815736559f0610ad4 (diff) | |
| download | smarty-3239a194359d0579deac5aba5e060e248fec3ef0.tar.gz smarty-3239a194359d0579deac5aba5e060e248fec3ef0.tar.bz2 smarty-3239a194359d0579deac5aba5e060e248fec3ef0.zip | |
- bugfix resolve naming conflict between custom Smarty delimiter '<%' and PHP ASP tags https://github.com/smarty-php/smarty/issues/64
Diffstat (limited to 'lexer/smarty_internal_templatelexer.plex')
| -rw-r--r-- | lexer/smarty_internal_templatelexer.plex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index e36df597..a74c4038 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -331,10 +331,6 @@ class Smarty_Internal_Templatelexer $this->value = substr($this->data,$this->counter,$to-$this->counter); return false; } - phpstart { - $obj = new Smarty_Internal_Compile_Private_Php(); - $obj->parsePhp($this); - } ldel literal rdel { if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; @@ -354,6 +350,10 @@ class Smarty_Internal_Templatelexer rdel { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } + phpstart { + $obj = new Smarty_Internal_Compile_Private_Php(); + $obj->parsePhp($this); + } text { $to = strlen($this->data); preg_match("~($this->ldel)|([<]script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*[>])|([<][?])|([<][%])|([?][>])|([%][>])~i",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); |
