From: Christian Dywan Date: Sat, 18 Jul 2009 14:37:01 +0000 (+0200) Subject: Don't save empty metadata keys to XBEL X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f492a28764c6c95510875d551f861461bd18c574;p=midori Don't save empty metadata keys to XBEL --- 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); }