This trivial patch makes sure that the GPG key or S/MIME certificate subject 
string as returned by libbalsa_cert_subject_readable() is utf8-clean.
diff --git a/libbalsa/gmime-gpgme-signature.c b/libbalsa/gmime-gpgme-signature.c
index a0676cb..822c303 100644
--- a/libbalsa/gmime-gpgme-signature.c
+++ b/libbalsa/gmime-gpgme-signature.c
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <glib.h>
 #include "libbalsa-gpgme.h"
+#include "misc.h"
 #include "gmime-gpgme-signature.h"
 
 
@@ -183,6 +184,7 @@
     gchar **elements;
     gint n;
     GString *result;
+    gchar *readable_subject;
 
     if (!subject)
         return NULL;
@@ -218,7 +220,9 @@
             result = g_string_append_c(result, ',');
     }
     g_strfreev(elements);
-    return g_string_free(result, FALSE);
+    readable_subject = g_string_free(result, FALSE);
+    libbalsa_utf8_sanitize(&readable_subject, TRUE, NULL);
+    return readable_subject;
 }
 
 static void

Attachment: pgpvrSlFswc5f.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to