- Revision
- 774
- Author
- mauro
- Date
- 2008-08-15 09:46:31 -0500 (Fri, 15 Aug 2008)
Log Message
WAFFLE-80: Restrict c built-in to numbers only.
Modified Paths
Diff
Modified: trunk/waffle-resources/src/main/resources/ftl/waffle/form.ftl (773 => 774)
--- trunk/waffle-resources/src/main/resources/ftl/waffle/form.ftl 2008-08-15 14:16:43 UTC (rev 773) +++ trunk/waffle-resources/src/main/resources/ftl/waffle/form.ftl 2008-08-15 14:46:31 UTC (rev 774) @@ -20,15 +20,17 @@ </#function> <#-- - * Joins list values. The values are converted using the c built-in to ensure that they are not formatted according to locales. + * Joins list values. * + * NOTE: The numeric values are converted using the c built-in to ensure that they are not formatted according to locales. + * * @param values the values to join * @param separator the separator to join list with * @return A string with joined values --> <#function join values separator> <#assign result = ''> - <#list values as value><#assign result=result+value?c><#if value_has_next><#assign result=result+separator></#if></#list> + <#list values as value><#if value?is_number><#assign result=result+value?c><#else><#assign result=result+value></#if><#if value_has_next><#assign result=result+separator></#if></#list> <#return result> </#function>
To unsubscribe from this list please visit:
