]> git.donarmstrong.com Git - debbugs.git/commitdiff
decode_utf8 the html record before calling decode_rfc1522; use Debbugs::UTF8
authorDon Armstrong <don@donarmstrong.com>
Tue, 12 Mar 2013 20:48:11 +0000 (13:48 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 12 Mar 2013 20:48:11 +0000 (13:48 -0700)
Debbugs/CGI/Bugreport.pm

index e4886d163d6a83d95780a91b0f3aef438f653a56..707c3a0d68a315d6e7791b265a04312be1b16522 100644 (file)
@@ -34,7 +34,8 @@ use IO::Scalar;
 use Params::Validate qw(validate_with :types);
 use Debbugs::MIME qw(decode_rfc1522 create_mime_message);
 use Debbugs::CGI qw(:url :html :util);
-use Debbugs::Common qw(globify_scalar english_join convert_to_utf8);
+use Debbugs::Common qw(globify_scalar english_join);
+use Debbugs::UTF8;
 use Debbugs::Config qw(:config);
 use POSIX qw(strftime);
 use Encode qw(decode_utf8);
@@ -334,7 +335,7 @@ sub handle_record{
      local $_ = $record->{type};
      if (/html/) {
         # $record->{text} is not in perl's internal encoding; convert it
-        my $text = decode_utf8(decode_rfc1522($record->{text}));
+        my $text = decode_rfc1522(decode_utf8($record->{text}));
          my ($time) = $text =~ /<!--\s+time:(\d+)\s+-->/;
          my $class = $text =~ /^<strong>(?:Acknowledgement|Reply|Information|Report|Notification)/m ? 'infmessage':'msgreceived';
          $output .= $text;