- #don't want to use this even if it is installed, its
- #segfaulting on weird characters and silently truncating the
- #ticket history output
- #see:
- # r44838@pinglin: jesse | 2006-11-14 15:53:18 -0500
- # * Move Text::Quoted back to being a run-time require. So that it's possible to turn off the feature if it causes your perl to segfault. (Text::Tabs is...not robust in the face of perl bugs)
- #eval { require Text::Quoted; $content = Text::Quoted::extract($content); };
- #if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) }
+ # It's a text type we don't have special handling for
+ else {
+ unless ( length $name ) {
+ eval {
+ require Text::Quoted;
+ # XXX: Deprecate ->can check in 4.2 and simply bump version requirement.
+ Text::Quoted::set_quote_characters(undef) # only use >
+ if Text::Quoted->can("set_quote_characters");
+ $content = Text::Quoted::extract($content);
+ };
+ if ($@) {
+ RT->Logger->error(
+ "Text::Quoted couldn't process attachment #@{[$message->id]}: $@."
+ . " This is a bug, please report it to rt-bugs\@bestpractical.com.");
+ }
+ }