X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FArticles%2FArticle%2FElements%2FPreformatted;h=faa1d55c1af1f5ee86ca42a676aa9fd761bdeeb9;hp=d4ab9f949d95e8a9af073b8f07cf7d6910df0d54;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=7588a4ac90a9b07c08a3107cd1107d773be1c991 diff --git a/rt/share/html/Articles/Article/Elements/Preformatted b/rt/share/html/Articles/Article/Elements/Preformatted index d4ab9f949..faa1d55c1 100644 --- a/rt/share/html/Articles/Article/Elements/Preformatted +++ b/rt/share/html/Articles/Article/Elements/Preformatted @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -89,19 +89,6 @@ my $cfs = $class->ArticleCustomFields; $include{"CF-Title-".$_->Id} = $include{"CF-Value-".$_->Id} = 1 while $_ = $cfs->Next; $include{$_} = not $class->FirstAttribute("Skip-$_") for keys %include; -my $de_htmlify = sub { - my $content = shift; - require HTML::TreeBuilder; - my $tree = HTML::TreeBuilder->new; - $tree->parse($content); - $tree->eof(); - - require HTML::FormatText; - my $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50); - $content = $formatter->format($tree); - return $content; -}; - my $get_content = sub { my $value = shift; return '' unless $value; @@ -116,7 +103,7 @@ my $get_content = sub { ); if ( $content =~ /<.{1,5}>/ ) { - $content = $de_htmlify->( $content ); + $content = RT::Interface::Email::ConvertHTMLToText( $content ); } return $content; };