From 70a2557b29f32831a1b45c8e7c7903a9bcfd81e2 Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 4 Dec 2000 22:30:15 +0000 Subject: [PATCH] *** empty log message *** --- Smarty.class.php | 7 ++++++- demo/templates/index.tpl | 2 +- libs/Smarty.class.php | 7 ++++++- templates/index.tpl | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Smarty.class.php b/Smarty.class.php index 2f44189e..18555c73 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -385,7 +385,12 @@ class Smarty return ""; /* Split tag into two parts: command and the arguments. */ - list($tag_command, $tag_args) = preg_split('!\s+!', $template_tag, 2); + preg_match('/^( + (?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | (?>[^"\' ]+))+ + ) + (?:\s+(.*))? + /x', $template_tag, $match); + list(, $tag_command, $tag_args) = $match; /* If the tag name matches a variable or section property definition, we simply process it. */ diff --git a/demo/templates/index.tpl b/demo/templates/index.tpl index d5c8749d..b3f78ca6 100644 --- a/demo/templates/index.tpl +++ b/demo/templates/index.tpl @@ -14,8 +14,8 @@ My interests are: {else} * {$outer/FirstName} {$outer/LastName} {/if} + {$outer/date|date_format:"%B %d, %Y"} {sectionelse} none {/section} -{html_options values=#title# output=$FirstName|replace:"a":"@"} diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 2f44189e..18555c73 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -385,7 +385,12 @@ class Smarty return ""; /* Split tag into two parts: command and the arguments. */ - list($tag_command, $tag_args) = preg_split('!\s+!', $template_tag, 2); + preg_match('/^( + (?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | (?>[^"\' ]+))+ + ) + (?:\s+(.*))? + /x', $template_tag, $match); + list(, $tag_command, $tag_args) = $match; /* If the tag name matches a variable or section property definition, we simply process it. */ diff --git a/templates/index.tpl b/templates/index.tpl index d5c8749d..b3f78ca6 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -14,8 +14,8 @@ My interests are: {else} * {$outer/FirstName} {$outer/LastName} {/if} + {$outer/date|date_format:"%B %d, %Y"} {sectionelse} none {/section} -{html_options values=#title# output=$FirstName|replace:"a":"@"}