[gnome-software/wip/hughsie/steam] Use as_markup_convert_full() to get the best description
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/steam] Use as_markup_convert_full() to get the best description
- Date: Fri, 2 Oct 2015 14:21:04 +0000 (UTC)
commit 786ec1c0c2e00972a9f67a49c33a0e62cfcf6f92
Author: Richard Hughes <richard hughsie com>
Date: Fri Oct 2 11:37:14 2015 +0100
Use as_markup_convert_full() to get the best description
src/plugins/gs-html-utils.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/gs-html-utils.c b/src/plugins/gs-html-utils.c
index 8e2eff8..b33d9e3 100644
--- a/src/plugins/gs-html-utils.c
+++ b/src/plugins/gs-html-utils.c
@@ -192,7 +192,6 @@ gs_html_utils_parse_description (const gchar *html, GError **error)
gs_html_utils_text_cb,
NULL,
NULL };
- g_autofree gchar *check = NULL;
g_autofree gchar *tmp = NULL;
g_autoptr(GString) str = NULL;
@@ -239,10 +238,9 @@ gs_html_utils_parse_description (const gchar *html, GError **error)
if (!g_markup_parse_context_parse (ctx, str->str, -1, error))
return NULL;
- /* verify this is valid AppStream markup */
- check = as_markup_convert_simple (helper.str->str, error);
- if (check == NULL)
- return NULL;
-
- return g_strdup (helper.str->str);
+ /* return only valid AppStream markup */
+ return as_markup_convert_full (helper.str->str,
+ AS_MARKUP_CONVERT_FORMAT_APPSTREAM,
+ AS_MARKUP_CONVERT_FLAG_IGNORE_ERRORS,
+ error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]