X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FArticles%2FArticle%2FElements%2FPreformatted;h=acfe6330f5bbd85f3ead8abd599f6452b3cbdc01;hb=0ed195595b5c7ea404c8848d9d1881ada4214489;hp=2f0e7869e016eeb8f0d712779bb9a58b7b1f5e9b;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/share/html/Articles/Article/Elements/Preformatted b/rt/share/html/Articles/Article/Elements/Preformatted index 2f0e7869e..acfe6330f 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-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 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; };