[Templates] Filters + replace

Andy Wardley abw@wardley.org
Fri, 28 Jul 2006 18:53:19 +0100


Sergey Martynoff wrote:
> Ow, sorry for disinformation. Since TT 2.15 the $1 substitution works in
> 'replace' virtual method, not in 'replace' filter. So, you can do this:

(Andy kicks himself *again* for ever making text virtual methods and 
filters two different things...)

However, now that we've moved the vmethods into a separate
Template::VMethods module, it should be easy to change the replace
filter to use the text_replace() method.  Ditto for any other filters
that do the same thing as vmethods.

As for the original question, I can't think of anything inbuilt that
would make it easier than quickly hacking out your own version of the
html_para filter.

Cheers
A