talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 269c861467109d3e5bc81f5b845e24f9f4125e1a
parent 9e07c9d83977443b9770f64a90ec8fdf1ec5adc3
Author: Paul <paul@claws-mail.org>
Date:   Tue,  2 Aug 2022 20:24:32 +0100

escape filenames to fix bug where filenames would not be shown and corrupt the output

also save some work for the translators, and remove some idle whitespace

Diffstat:
Msrc/plugins/att_remover/att_remover.c | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/plugins/att_remover/att_remover.c b/src/plugins/att_remover/att_remover.c @@ -285,25 +285,25 @@ static void fill_attachment_store(GtkTreeView *list_view, MimeInfo *partinfo) partinfo = procmime_mimeinfo_next(partinfo); if (!partinfo) return; - + while (partinfo) { if (MIMEINFO_NOT_ATTACHMENT(partinfo)) { partinfo = procmime_mimeinfo_next(partinfo); continue; } - + content_type = procmime_get_content_type_str( partinfo->type, partinfo->subtype); - - name = procmime_mimeinfo_get_parameter(partinfo, "filename"); + + name = g_markup_escape_text(procmime_mimeinfo_get_parameter(partinfo, "filename"), -1); if (!name) - name = procmime_mimeinfo_get_parameter(partinfo, "name"); + name = g_markup_escape_text(procmime_mimeinfo_get_parameter(partinfo, "name"), -1); if (!name) name = _("unknown"); - - label = g_strconcat("<b>",_("Type:"), "</b> ", content_type, " <b>", - _("Size:"), "</b> ", to_human_readable((goffset)partinfo->length), - "\n", "<b>", _("Filename:"), "</b> ", name, NULL); + + label = g_strconcat("<b>", _("Type"), ":</b> ", content_type, " <b>", + _("Size"), ":</b> ", to_human_readable((goffset)partinfo->length), + "\n", "<b>", _("Filename"), ":</b> ", name, NULL); gtk_list_store_append(list_store, &iter); gtk_list_store_set(list_store, &iter,