From c11eea1a0cec0e079fb6bebef6dbc11c023a13be Mon Sep 17 00:00:00 2001 From: Martin Kamerbeek Date: Wed, 7 Jul 2010 13:14:53 +0200 Subject: [PATCH] Use HTML::FormatText::WithLinks::AndTables instead of webgui's built in html2text. --- lib/WebGUI/Mailing/Email.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Mailing/Email.pm b/lib/WebGUI/Mailing/Email.pm index c5fa17f..c925fdb 100644 --- a/lib/WebGUI/Mailing/Email.pm +++ b/lib/WebGUI/Mailing/Email.pm @@ -148,11 +148,13 @@ sub transformToText { my $self = shift; my $html = shift; - my $text = $html; - #HTML::Entities::decode($text); - $text =~ s/(.+?)<\/a>/$2 ($1)/g; - $text = WebGUI::HTML::html2text($text); +# my $text = $html; +# #HTML::Entities::decode($text); +# $text =~ s/(.+?)<\/a>/$2 ($1)/g; +# $text = WebGUI::HTML::html2text($text); + use HTML::FormatText::WithLinks::AndTables; + my $text = HTML::FormatText::WithLinks::AndTables->convert( $html ); return $text; }