[Rt-commit] r13470 - rt/3.8/trunk/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Fri Jun 20 15:52:17 EDT 2008


Author: ruz
Date: Fri Jun 20 15:52:17 2008
New Revision: 13470

Modified:
   rt/3.8/trunk/lib/RT/Template_Overlay.pm

Log:
* revert template changes as some tests fail

Modified: rt/3.8/trunk/lib/RT/Template_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Template_Overlay.pm	(original)
+++ rt/3.8/trunk/lib/RT/Template_Overlay.pm	Fri Jun 20 15:52:17 2008
@@ -351,11 +351,7 @@
 
     ### Should we forgive normally-fatal errors?
     $parser->ignore_errors(1);
-
-    open my $stream, "<:utf8", \$content
-        or return (0, $self->loc("Couldn't open stream for parsing MIME::Entity: $!"));
-
-    $self->{'MIMEObj'} = eval { $parser->parse( $stream ) };
+    $self->{'MIMEObj'} = eval { $parser->parse_data($content) };
     if ( my $error = $@ || $parser->last_error ) {
         $RT::Logger->error( "$error" );
         return ( 0, $error );
@@ -429,6 +425,8 @@
     );
     return ( undef, $self->loc('Template parsing error') ) if $is_broken;
 
+    # MIME::Parser has problems dealing with high-bit utf8 data.
+    Encode::_utf8_off($retval);
     return ($retval);
 }
 


More information about the Rt-commit mailing list