mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
*** empty log message ***
This commit is contained in:
@@ -1187,7 +1187,7 @@ class Smarty
|
|||||||
function _parse_modifiers(&$output, $modifier_string)
|
function _parse_modifiers(&$output, $modifier_string)
|
||||||
{
|
{
|
||||||
$qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
|
$qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
|
||||||
preg_match_all('!\|@?(\w+)((?>:(?:'. $qstr_regexp . '|[^|]+))*)!', '|' . $modifier_string, $match);
|
preg_match_all('!\|(@?\w+)((?>:(?:'. $qstr_regexp . '|[^|]+))*)!', '|' . $modifier_string, $match);
|
||||||
list(, $modifiers, $modifier_arg_strings) = $match;
|
list(, $modifiers, $modifier_arg_strings) = $match;
|
||||||
|
|
||||||
for ($i = 0; $i < count($modifiers); $i++) {
|
for ($i = 0; $i < count($modifiers); $i++) {
|
||||||
|
@@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
<PRE>
|
<PRE>
|
||||||
|
|
||||||
|
{$Name}
|
||||||
|
{$Name}
|
||||||
|
|
||||||
{* bold and title are read from the config file *}
|
{* bold and title are read from the config file *}
|
||||||
{if #bold#}<b>{/if}
|
{if #bold#}<b>{/if}
|
||||||
{* capitalize the first letters of each word of the title *}
|
{* capitalize the first letters of each word of the title *}
|
||||||
@@ -46,6 +49,8 @@ testing strip tags
|
|||||||
</table>
|
</table>
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|
||||||
|
</PRE>
|
||||||
|
|
||||||
This is an example of the html_select_date function:
|
This is an example of the html_select_date function:
|
||||||
|
|
||||||
</PRE>
|
</PRE>
|
||||||
@@ -61,3 +66,4 @@ This is an example of the html_options function:
|
|||||||
{html_options values=$option_values selected=$option_selected output=$option_output}
|
{html_options values=$option_values selected=$option_selected output=$option_output}
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@@ -1187,7 +1187,7 @@ class Smarty
|
|||||||
function _parse_modifiers(&$output, $modifier_string)
|
function _parse_modifiers(&$output, $modifier_string)
|
||||||
{
|
{
|
||||||
$qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
|
$qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
|
||||||
preg_match_all('!\|@?(\w+)((?>:(?:'. $qstr_regexp . '|[^|]+))*)!', '|' . $modifier_string, $match);
|
preg_match_all('!\|(@?\w+)((?>:(?:'. $qstr_regexp . '|[^|]+))*)!', '|' . $modifier_string, $match);
|
||||||
list(, $modifiers, $modifier_arg_strings) = $match;
|
list(, $modifiers, $modifier_arg_strings) = $match;
|
||||||
|
|
||||||
for ($i = 0; $i < count($modifiers); $i++) {
|
for ($i = 0; $i < count($modifiers); $i++) {
|
||||||
|
@@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
<PRE>
|
<PRE>
|
||||||
|
|
||||||
|
{$Name}
|
||||||
|
{$Name}
|
||||||
|
|
||||||
{* bold and title are read from the config file *}
|
{* bold and title are read from the config file *}
|
||||||
{if #bold#}<b>{/if}
|
{if #bold#}<b>{/if}
|
||||||
{* capitalize the first letters of each word of the title *}
|
{* capitalize the first letters of each word of the title *}
|
||||||
@@ -46,6 +49,8 @@ testing strip tags
|
|||||||
</table>
|
</table>
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|
||||||
|
</PRE>
|
||||||
|
|
||||||
This is an example of the html_select_date function:
|
This is an example of the html_select_date function:
|
||||||
|
|
||||||
</PRE>
|
</PRE>
|
||||||
@@ -61,3 +66,4 @@ This is an example of the html_options function:
|
|||||||
{html_options values=$option_values selected=$option_selected output=$option_output}
|
{html_options values=$option_values selected=$option_selected output=$option_output}
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user