X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FControl.pm;h=6851656f49c6b4d4bde5c4c857cbb8584a2cde0a;hb=57207dfb5b9192725a127821ab3a3ff5b4ac13c7;hp=a89a7eb7386594c888bb55e71fddf2291390f1b5;hpb=6f33f786cb1fbce5eb684a46a7ff86314cbe2ae8;p=debbugs.git diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index a89a7eb..6851656 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -108,7 +108,7 @@ BEGIN{ } use Debbugs::Config qw(:config); -use Debbugs::Common qw(:lock buglog :misc get_hashname sort_versions); +use Debbugs::Common qw(:lock buglog :misc get_hashname sort_versions :utf8); use Debbugs::Status qw(bug_archiveable :read :hook writebug new_bug splitpackages split_status_fields get_bug_status); use Debbugs::CGI qw(html_escape); use Debbugs::Log qw(:misc :write); @@ -132,6 +132,7 @@ use POSIX qw(strftime); use Storable qw(dclone nfreeze); use List::Util qw(first max); +use Encode qw(encode_utf8); use Carp; @@ -996,7 +997,7 @@ sub set_done { headers => [To => $data->{submitter}, Subject => "$config{ubug}#$data->{bug_num} ". - "closed by $param{requester} ($param{request_subject})", + "closed by $param{requester} ".(defined $param{request_subject}?"($param{request_subject})":""), ], ) ], @@ -2898,7 +2899,7 @@ sub clone_bug { for my $bug (split ' ', $data->{blocks}) { for my $new_bug (@new_bugs) { set_blocks(bug => $new_bug, - blocks => $bug, + block => $bug, hash_slice(%param, keys %common_options, keys %append_action_options), @@ -2909,7 +2910,7 @@ sub clone_bug { for my $bug (split ' ', $data->{blockedby}) { for my $new_bug (@new_bugs) { set_blocks(bug => $bug, - blocks => $new_bug, + block => $new_bug, hash_slice(%param, keys %common_options, keys %append_action_options), @@ -3355,7 +3356,7 @@ sub append_action_to_log{ $nd{$key} = $new_data->{$key}; # $data_diff .= html_escape("$Debbugs::Status::fields{$key}: $new_data->{$key}")."\n"; } - $data_diff .= html_escape(Data::Dumper->Dump([\%nd],[qw(new_data)])); + $data_diff .= html_escape(Data::Dumper->Dump([encode_utf8_structure(\%nd)],[qw(new_data)])); $data_diff .= "-->\n"; $data_diff .= "\n"; } my $msg = join('', (exists $param{command} ? - "\n":"" + "\n":"" ), (length $param{requester} ? - "\n":"" + "\n":"" ), (length $param{request_addr} ? - "\n":"" + "\n":"" ), "\n", $data_diff, - "".html_escape($param{action})."\n"); + "".html_escape(encode_utf8($param{action}))."\n"); if (length $param{requester}) { - $msg .= "Request was from ".html_escape($param{requester})."\n"; + $msg .= "Request was from ".html_escape(encode_utf8($param{requester}))."\n"; } if (length $param{request_addr}) { - $msg .= "to ".html_escape($param{request_addr}).""; + $msg .= "to ".html_escape(encode_utf8($param{request_addr})).""; } if (length $param{desc}) { - $msg .= ":
\n$param{desc}\n"; + $msg .= ":
\n".encode_utf8($param{desc})."\n"; } else { $msg .= ".\n";