Kelly Thompson wrote:
> [% MACRO unescape(text)
> text.replace('{b}', '<b>').replace('{/b}', '</b>').replace('{i}', 
> '<i>').replace('{/i}', '</i>').etc..
> %]

Hi Kelly,

I think you're missing a GET in there.  Also, you can combine the
different replace() calls into one regex:

[% MACRO unescape(text)
      GET text.replace('{(/?)([bi])}', '<$1$2>', 1);
%]

HTH
A


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to