[ic] strip html filter AND apply two filters to one value?

Ed LaFrance interchange-users@icdevgroup.org
Tue Jul 23 12:36:01 2002


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/2002-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]



>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.


===============================================================
Increase profits from your Interchange store...
http://www.newmediaems.com/cgi-bin/nm/software_fus.html
===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================