From 1ead15d0cda5036b267c81fe9facc92b15cba6d7 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 8 Jul 2012 14:42:13 -0700 Subject: [PATCH] call decode_rfc1522 before calling decode_utf8 --- Debbugs/CGI/Bugreport.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2