mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 04:00:41 +00:00
Do not pre-convert the update description from AppStream XML
This allows the text clients like fwupdmgr to convert to UTF-8 text, and graphical clients can use the markdown target to ensure the links are made clickable and paragraphs are presented in the right way.
This commit is contained in:
parent
04ee5856d0
commit
fe8b96e74e
@ -757,15 +757,9 @@ fu_main_get_updates (FuMainPrivate *priv, GError **error)
|
||||
}
|
||||
tmp = as_release_get_description (rel, NULL);
|
||||
if (tmp != NULL) {
|
||||
_cleanup_free_ gchar *md = NULL;
|
||||
md = as_markup_convert (tmp, -1,
|
||||
AS_MARKUP_CONVERT_FORMAT_SIMPLE,
|
||||
NULL);
|
||||
if (md != NULL) {
|
||||
fu_device_set_metadata (item->device,
|
||||
FU_DEVICE_KEY_UPDATE_DESCRIPTION,
|
||||
md);
|
||||
}
|
||||
fu_device_set_metadata (item->device,
|
||||
FU_DEVICE_KEY_UPDATE_DESCRIPTION,
|
||||
tmp);
|
||||
}
|
||||
g_ptr_array_add (updates, item);
|
||||
}
|
||||
|
@ -1290,6 +1290,7 @@ fu_util_get_updates (FuUtilPrivate *priv, gchar **values, GError **error)
|
||||
{
|
||||
FuDevice *dev;
|
||||
GPtrArray *devices = NULL;
|
||||
const gchar *tmp;
|
||||
guint i;
|
||||
|
||||
/* print any updates */
|
||||
@ -1315,9 +1316,18 @@ fu_util_get_updates (FuUtilPrivate *priv, gchar **values, GError **error)
|
||||
fu_util_print_data (_("Location"),
|
||||
fu_device_get_metadata (dev, FU_DEVICE_KEY_UPDATE_URI));
|
||||
|
||||
/* TRANSLATORS: section header for long firmware desc */
|
||||
fu_util_print_data (_("Description"),
|
||||
fu_device_get_metadata (dev, FU_DEVICE_KEY_UPDATE_DESCRIPTION));
|
||||
/* convert XML -> text */
|
||||
tmp = fu_device_get_metadata (dev, FU_DEVICE_KEY_UPDATE_DESCRIPTION);
|
||||
if (tmp != NULL) {
|
||||
_cleanup_free_ gchar *md = NULL;
|
||||
md = as_markup_convert (tmp, -1,
|
||||
AS_MARKUP_CONVERT_FORMAT_SIMPLE,
|
||||
NULL);
|
||||
if (md != NULL) {
|
||||
/* TRANSLATORS: section header for long firmware desc */
|
||||
fu_util_print_data (_("Description"), md);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user