[ic] strip html filter AND apply two filters to one value?
Aaron Hazelton
interchange-users@icdevgroup.org
Tue Jul 23 15:54:00 2002
Ed LaFrance wrote:
>
> At 11:32 AM 07/23/2002 -0400, you wrote:
> >Hi all,
> >
> >first of all, I was looking for a filter to remove all
> >html tags from a returned value. I found this one
> >searching the archives:
> >http://interchange.redhat.com/pipermail/interchange-users/200
> 2-February/
> >018133.html
>
> Can't get the message in that URL, but this should work, if
> the docs on the
> subject are right:
>
> GlobalSub <<EOR
> sub new_filter {
> BEGIN {
> package Vend::Interpolate;
> $Filter{nohtml} = sub {
> my $val = shift;
> $val =~ s/<\w+?>//g;
> return val;
> };
> }
> }
> EOR
>
>
> ...call it as [filter nohtml]...[/filter]
>
>
Inserted *exactly* as above into interchange.cfg
and IC restarted, I get the following error:
12.219.212.128 bqEm7r5t:12.219.212.128 -
[23/July/2002:14:40:05 -0500] ff /cgi-bin/ff.cgi/search.html
Unknown filter nohtml
any ideas? this is just like the one in the archives.
>
> >but after restarting IC and trying it I get an 'unknown
> >filter' error in the catalog's error log. Has anyone
> >come up with a reverse to the 'text2html' filter or
> >know what is wrong with this one?
> >
> >Also, I know the [filter] tag cannot nest, is there
> >a way to apply TWO filters to ONE returned
> >value?
> >
> >As always, Thanks!
> >=Aaron=
> >Hazenet.net
>
> I've done this before:
>
> [filter foo][value filter=bar name=somevalue][/filter]
>
> - Ed L.
>
I do have both filters trying to go through as Jonathan
said. - missed that in the docs :-)
[filter op="nohtml 75"] [item-field comment][/filter]
length works, its just that the 'nohtml' still gives the error
Thanks,
=Aaron=
Hazenet.net