[Templates] Wrap text in an HTML tag

Ronald J Kimball rkimball+tt at pangeamedia.com
Mon Feb 11 17:45:08 GMT 2008


Josh Rosenbaum wrote:

> Looks like the replace filter doesn't use the new replace vmethod code. If you use the .replace() vmethod it should work ok.
> 
> ie:
> [% Catalyst.localize('You have [quant,_1,new message].',
>                       new_message_count).replace('(\d+)', '<span class="highlight">$1</span>') %]

Perfect, thanks!

Ronald



More information about the templates mailing list