Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Martin Kamerbeek
c11eea1a0c Use HTML::FormatText::WithLinks::AndTables instead of webgui's built in html2text. 2010-07-07 13:14:53 +02:00

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;
}