On 08/01/07, Xavier Robin <[EMAIL PROTECTED]> wrote:
Hello,

Do you know a (catalyst plugin|perl module|external tool) that converts HTML
to plain text? I mean, keeping some formatting (especially lists and
links...), not just stripping HTML tags...

I tried Template::Plugin::HtmlToText that fits well into TT, but the links are
lost. Lists are well rendered, though.

Something like this should work:

   my $scrubber = HTML::Scrubber->new( allow => [qw/ a ul ol li /] );
   my $text = $scrubber->scrub( $html );

Carl

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to