diff --git a/change_log.txt b/change_log.txt index 7cfa5255..50fdcf4a 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +11/26/2009 +- bugfix on nested doublequoted strings + 11/25/2009 - allow the following writing for boolean: true, TRUE, True, false, FALSE, False - {strip} tag functionality rewritten diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index 6954a873..e4bc6d31 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -1253,7 +1253,7 @@ class Smarty_Internal_Templatelexer if ($this->counter >= strlen($this->data)) { return false; // end of input } - $yy_global_pattern = "/^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)/"; + $yy_global_pattern = "/^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { @@ -1293,14 +1293,14 @@ class Smarty_Internal_Templatelexer // skip this token continue; } else { $yy_yymore_patterns = array( - 1 => array(0, "^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 2 => array(0, "^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 3 => array(0, "^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 4 => array(0, "^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 5 => array(0, "^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 6 => array(0, "^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 7 => array(0, "^(\\$)|^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), - 8 => array(0, "^(([\S\s]*?)(\\\\\\\\|[^\\\\]\"|".$this->ldel."|\\$|`\\$))|^([\S\s]+)"), + 1 => array(0, "^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 2 => array(0, "^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 3 => array(0, "^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 4 => array(0, "^(\")|^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 5 => array(0, "^(`\\$)|^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 6 => array(0, "^(\\$\\w+)|^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 7 => array(0, "^(\\$)|^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), + 8 => array(0, "^(([\S\s]*?)(".$this->ldel."|\\$|`\\$|\\\\\\\\|[^\\\\]\"))|^([\S\s]+)"), 9 => array(2, "^([\S\s]+)"), 12 => array(2, ""), );