X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FArticles%2FArticle%2FElements%2FPreformatted;h=74e5af0580f509e3cb23581a315f8f25b6bc2c4c;hb=187086c479a09629b7d180eec513fb7657f4e291;hp=0b4ddaaaacf6e842ef9885f7a175c25b51dcd7b2;hpb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;p=freeside.git diff --git a/rt/share/html/Articles/Article/Elements/Preformatted b/rt/share/html/Articles/Article/Elements/Preformatted index 0b4ddaaaa..74e5af058 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-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2018 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; };