-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

sure, post filtering would be a good feature! Meanwhile I get by
with pre filtering in the following way:

$CLEANFILTER = sub {
  return if $CFG->{no_filter} == 1;
  my $text_ref = shift;
  my $h = new HTML::Clean($text_ref, 9);
  $h->strip({whitespace => 1,
             shortertags => 1,
             contenttype => 1,
             dequote => 1,
             comments => 1,
            });
  $text_ref = $h->data;
};

  $TEMPLATE = HTML::Template->new(
                                  filename => $CFG->{map_template},
                                  filter   => $CLEANFILTER,
                                  shared_cache => 1,
                                 );

In C::A you have to define your own load_tmpl method to use this kind
of filtering. You might do this anyway to associate your query and/or
session object with the template in advance -- a technique which I
found very keystroke-saving.

This pre filtering helps to keep the cache small, too. It cleans up
the whitespace I write to get an editable template, and normally in
the filled in values I have not that many unnecessary space chars.

As C::A takes the $tempate->output as return value of it's run-modes,
post filtering could easily be applied there without touching H::T. 

Just my 2ct.

Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQE+SW5jxxUzQSse11ARAlyrAJ9tSYtBSxMF2CmLDHF5ayxPWWCnbwCfWxif
nC8XjrSsbBoDV17kx0Q9xC0=
=Lluv
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to