Use HTML::FormatText::WithLinks::AndTables instead of webgui's built in html2text.
This commit is contained in:
parent
ec1b135dbd
commit
c11eea1a0c
1 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue