diff options
author | Richard Hughes <richard@hughsie.com> | 2016-11-10 19:51:54 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-11-10 19:52:08 +0000 |
commit | 73170ffd553d7b1091bda293a8cd4953e476562b (patch) | |
tree | 4c0c7e4b656464ad6cfdfa807303d5f411fd6c5b | |
parent | 70dd12823ed224f52e0777f4217870060b8a2394 (diff) | |
download | appstream-glib-73170ffd553d7b1091bda293a8cd4953e476562b.tar.gz |
trivial: Do not attempt to parse unknown tags when converting
This is fallout from the previous patch but logically correct on it's own.
-rw-r--r-- | libappstream-glib/as-markup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libappstream-glib/as-markup.c b/libappstream-glib/as-markup.c index 1b185cc..d843f2d 100644 --- a/libappstream-glib/as-markup.c +++ b/libappstream-glib/as-markup.c @@ -541,6 +541,8 @@ as_markup_convert_full (const gchar *markup, for (tmp = root->children; tmp != NULL; tmp = tmp->next) { tag = as_node_get_name (tmp); + if (g_strcmp0 (tag, "unknown") == 0) + continue; if (g_strcmp0 (tag, "p") == 0) { as_markup_render_para (str, format, as_node_get_data (tmp)); continue; @@ -552,6 +554,8 @@ as_markup_convert_full (const gchar *markup, as_markup_render_ul_start (str, format); for (tmp_c = tmp->children; tmp_c != NULL; tmp_c = tmp_c->next) { tag_c = as_node_get_name (tmp_c); + if (g_strcmp0 (tag_c, "unknown") == 0) + continue; if (g_strcmp0 (tag_c, "li") == 0) { as_markup_render_li (str, format, as_node_get_data (tmp_c)); |