]> git.donarmstrong.com Git - debbugs.git/commitdiff
call decode_rfc1522 before calling decode_utf8 cgiencoding
authorDon Armstrong <don@donarmstrong.com>
Sun, 8 Jul 2012 21:42:13 +0000 (14:42 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 8 Jul 2012 21:42:13 +0000 (14:42 -0700)
Debbugs/CGI/Bugreport.pm

index d8bdb15952af71d0d921873e2435f40a10f3c017..154ee0470fc4b3079fe5726ca303e5657fdff590 100644 (file)
@@ -334,10 +334,10 @@ sub handle_record{
      local $_ = $record->{type};
      if (/html/) {
         # $record->{text} is not in perl's internal encoding; convert it
-        my $text = decode_utf8($record->{text});
+        my $text = decode_utf8(decode_rfc1522($record->{text}));
          my ($time) = $text =~ /<!--\s+time:(\d+)\s+-->/;
          my $class = $text =~ /^<strong>(?:Acknowledgement|Reply|Information|Report|Notification)/m ? 'infmessage':'msgreceived';
-         $output .= decode_rfc1522($text);
+         $output .= $text;
          # Link to forwarded http:// urls in the midst of the report
          # (even though these links already exist at the top)
          $output =~ s,((?:ftp|http|https)://[\S~-]+?/?)((?:[\)\'\:\.\,]|\&\#39;)?(?:\s|\.<|$)),<a href=\"$1\">$1</a>$2,go;