Use HTML::FormatText::WithLinks::AndTables instead of webgui's built in html2text.

This commit is contained in:
Martin Kamerbeek 2010-07-07 13:14:53 +02:00
parent ec1b135dbd
commit c11eea1a0c

View file

@ -148,11 +148,13 @@ sub transformToText {
my $self = shift;
my $html = shift;
my $text = $html;
#HTML::Entities::decode($text);
$text =~ s/<a.*?href=["'](.*?)['"].*?>(.+?)<\/a>/$2 ($1)/g;
$text = WebGUI::HTML::html2text($text);
# my $text = $html;
# #HTML::Entities::decode($text);
# $text =~ s/<a.*?href=["'](.*?)['"].*?>(.+?)<\/a>/$2 ($1)/g;
# $text = WebGUI::HTML::html2text($text);
use HTML::FormatText::WithLinks::AndTables;
my $text = HTML::FormatText::WithLinks::AndTables->convert( $html );
return $text;
}