From: Don Armstrong Date: Thu, 14 Mar 2013 19:59:41 +0000 (-0700) Subject: Merge branch 'don/fix_encoding' X-Git-Tag: release/2.6.0~313 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=04265c83beff7e1ccb28a88ff7257fe36b2fc45d;hp=-c;p=debbugs.git Merge branch 'don/fix_encoding' --- 04265c83beff7e1ccb28a88ff7257fe36b2fc45d diff --combined Debbugs/Control.pm index 5739734,44463ba..9587624 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@@ -110,7 -110,8 +110,8 @@@ BEGIN } use Debbugs::Config qw(:config); - use Debbugs::Common qw(:lock buglog :misc get_hashname sort_versions :utf8); + use Debbugs::Common qw(:lock buglog :misc get_hashname sort_versions); + use Debbugs::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); @@@ -1578,11 -1579,7 +1579,11 @@@ sub set_found if (not @svers) { @svers = $version; } - else { + elsif (not grep {$version eq $_} @svers) { + # The $version was not equal to one of the source + # versions, so it's probably unqualified (or just + # wrong). Delete it, and use the source versions + # instead. if (exists $found_versions{$version}) { delete $found_versions{$version}; $found_removed{$version} = 1; @@@ -3437,25 -3434,25 +3438,25 @@@ sub append_action_to_log } my $msg = join('', (exists $param{command} ? - "\n":"" + "\n":"" ), (length $param{requester} ? - "\n":"" + "\n":"" ), (length $param{request_addr} ? - "\n":"" + "\n":"" ), "\n", $data_diff, - "".html_escape(encode_utf8($param{action}))."\n"); + "".html_escape(encode_utf8_safely($param{action}))."\n"); if (length $param{requester}) { - $msg .= "Request was from ".html_escape(encode_utf8($param{requester}))."\n"; + $msg .= "Request was from ".html_escape(encode_utf8_safely($param{requester}))."\n"; } if (length $param{request_addr}) { - $msg .= "to ".html_escape(encode_utf8($param{request_addr})).""; + $msg .= "to ".html_escape(encode_utf8_safely($param{request_addr})).""; } if (length $param{desc}) { - $msg .= ":
\n".encode_utf8($param{desc})."\n"; + $msg .= ":
\n".encode_utf8_safely($param{desc})."\n"; } else { $msg .= ".\n";