From f492a28764c6c95510875d551f861461bd18c574 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 18 Jul 2009 16:37:01 +0200 Subject: [PATCH] Don't save empty metadata keys to XBEL --- midori/midori-array.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/midori/midori-array.c b/midori/midori-array.c index de61c95a..93195366 100644 --- a/midori/midori-array.c +++ b/midori/midori-array.c @@ -360,8 +360,9 @@ katze_item_metadata_to_xbel (KatzeItem* item) g_string_append_printf (markup, "%s\"", namespace_uri); i = 0; while ((key = g_list_nth_data (keys, i++))) - g_string_append_printf (markup, " %s:%s=\"%s\"", namespace, key, - katze_item_get_meta_string (item, key)); + if (katze_item_get_meta_string (item, key)) + g_string_append_printf (markup, " %s:%s=\"%s\"", namespace, key, + katze_item_get_meta_string (item, key)); g_string_append_printf (markup, "/>\n\n"); return g_string_free (markup, FALSE); }