From: Don Armstrong Date: Sun, 8 Jul 2012 21:42:13 +0000 (-0700) Subject: call decode_rfc1522 before calling decode_utf8 X-Git-Tag: release/2.6.0~368 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=1ead15d0cda5036b267c81fe9facc92b15cba6d7 call decode_rfc1522 before calling decode_utf8 --- diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index d8bdb15..154ee04 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -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 =~ //; my $class = $text =~ /^(?: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|\.<|$)),$1$2,go;