aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/gui.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-05-02 19:51:54 +0000
committerThierry Vignaud <tv@mandriva.org>2007-05-02 19:51:54 +0000
commita6dbf66d18616e8b08897dca5104b04e5c610768 (patch)
tree6066684ab48d05fe2c45aa9e68293d11f2242787 /Rpmdrake/gui.pm
parentcc5fcdc24ecc128918a13540353fe7235888296d (diff)
downloadrpmdrake-a6dbf66d18616e8b08897dca5104b04e5c610768.tar
rpmdrake-a6dbf66d18616e8b08897dca5104b04e5c610768.tar.gz
rpmdrake-a6dbf66d18616e8b08897dca5104b04e5c610768.tar.bz2
rpmdrake-a6dbf66d18616e8b08897dca5104b04e5c610768.tar.xz
rpmdrake-a6dbf66d18616e8b08897dca5104b04e5c610768.zip
(format_pkg_simplifiedinfo) handle invalid UTF8 summaries, thus fixing
crash (#30409)
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r--Rpmdrake/gui.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index dddc05e9..b8640e37 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -73,7 +73,8 @@ sub format_pkg_simplifiedinfo {
my $raw_medium = pkg2medium($pkgs->{$key}{pkg}, $urpm);
my $medium = $raw_medium ? $raw_medium->{name} : undef;
my $update_descr = $pkgs->{$key}{pkg}->flag_upgrade && $descriptions->{$name}{pre} && $descriptions->{$name}{medium} eq $medium;
- my $s = ugtk2::markup_to_TextView_format(join("\n", format_header($name . ' - ' . translate($pkgs->{$key}{summary})) .
+ my $summary = translate(to_utf8($pkgs->{$key}{summary}));
+ my $s = ugtk2::markup_to_TextView_format(join("\n", format_header(join(' - ', $name, (utf8::valid($summary) ? $summary : ()))) .
# workaround gtk+ bug where GtkTextView wronly limit embedded widget size to bigger line's width (#25533):
"\x{200b} \x{feff}" . ' ' x 120,
if_($update_descr, # is it an update?