mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-04 13:58:48 +00:00
trivial: Fallback to text if the multiline description was invalid XML
This commit is contained in:
parent
121cffe7d8
commit
167046b4ce
@ -1263,6 +1263,8 @@ fu_util_device_to_string (FwupdDevice *dev, guint idt)
|
|||||||
if (tmp != NULL) {
|
if (tmp != NULL) {
|
||||||
g_autofree gchar *desc = NULL;
|
g_autofree gchar *desc = NULL;
|
||||||
desc = fu_util_convert_description (tmp, NULL);
|
desc = fu_util_convert_description (tmp, NULL);
|
||||||
|
if (desc == NULL)
|
||||||
|
desc = g_strdup (tmp);
|
||||||
/* TRANSLATORS: multiline description of device */
|
/* TRANSLATORS: multiline description of device */
|
||||||
fu_common_string_append_kv (str, idt + 1, _("Description"), desc);
|
fu_common_string_append_kv (str, idt + 1, _("Description"), desc);
|
||||||
}
|
}
|
||||||
@ -1669,6 +1671,8 @@ fu_util_release_to_string (FwupdRelease *rel, guint idt)
|
|||||||
if (fwupd_release_get_description (rel) != NULL) {
|
if (fwupd_release_get_description (rel) != NULL) {
|
||||||
g_autofree gchar *desc = NULL;
|
g_autofree gchar *desc = NULL;
|
||||||
desc = fu_util_convert_description (fwupd_release_get_description (rel), NULL);
|
desc = fu_util_convert_description (fwupd_release_get_description (rel), NULL);
|
||||||
|
if (desc == NULL)
|
||||||
|
desc = g_strdup (fwupd_release_get_description (rel));
|
||||||
/* TRANSLATORS: multiline description of device */
|
/* TRANSLATORS: multiline description of device */
|
||||||
fu_common_string_append_kv (str, idt + 1, _("Description"), desc);
|
fu_common_string_append_kv (str, idt + 1, _("Description"), desc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user