Fixed a bug with quoted strings inside if statements.

This commit is contained in:
andrey
2001-06-14 14:26:59 +00:00
parent 7ea781c510
commit ef75416b25
3 changed files with 6 additions and 4 deletions

6
NEWS
View File

@@ -1,5 +1,7 @@
- added security features for third party template editing (Monte,Andrei)
- added assign custom function, documented (Monte)
- fixed a bug with passing quoted arguments to modifiers inside {if}
statements. (Andrei, Sam Beckwith)
- added security features for third party template editing. (Monte, Andrei)
- added assign custom function, documented. (Monte)
- fixed a problem with putting $ followed by numbers inside {strip} and
{/strip} tags. (Andrei)
- fixed Config_File class to allow empty config paths (defaults to current

View File

@@ -476,7 +476,7 @@ class Smarty_Compiler extends Smarty {
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | # match all double quoted strings allowed escaped double quotes
\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | # match all single quoted strings allowed escaped single quotes
[()] | # match parentheses
[^"\'\s()]+ # match any other token that is not any of the above
[^\s()]+ # match any other token that is not any of the above
)/x', $tag_args, $match);
$tokens = $match[0];

View File

@@ -476,7 +476,7 @@ class Smarty_Compiler extends Smarty {
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | # match all double quoted strings allowed escaped double quotes
\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | # match all single quoted strings allowed escaped single quotes
[()] | # match parentheses
[^"\'\s()]+ # match any other token that is not any of the above
[^\s()]+ # match any other token that is not any of the above
)/x', $tag_args, $match);
$tokens = $match[0];