summaryrefslogtreecommitdiff
path: root/search-provider
diff options
context:
space:
mode:
authorSebastian Keller <skeller@gnome.org>2021-12-22 23:24:57 +0100
committerSebastian Keller <skeller@gnome.org>2021-12-22 23:55:15 +0100
commitdfc504409fbc33c072402012835395cdca6ac7b6 (patch)
treea420af9e939746af1a0238380a3339d00b862d0b /search-provider
parentd64590de38b2817040c02616ff4d7e733617c900 (diff)
downloadgnome-control-center-dfc504409fbc33c072402012835395cdca6ac7b6.tar.gz
search-provider: Don't escape result description as markup
Only the shell can know how the description string will be used and if or when it should be escaped. Previously the shell did not escape the description before displaying it with markup to highlight search hits, but now it does. For gnome-control-center this however means without this change the string will be escaped twice causing markup to show up in the description text. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2033
Diffstat (limited to 'search-provider')
-rw-r--r--search-provider/cc-search-provider.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/search-provider/cc-search-provider.c b/search-provider/cc-search-provider.c
index 49df7f48f..8a8981a56 100644
--- a/search-provider/cc-search-provider.c
+++ b/search-provider/cc-search-provider.c
@@ -210,7 +210,6 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
for (i = 0; results[i]; i++)
{
- g_autofree gchar *escaped_description = NULL;
g_autofree gchar *description = NULL;
g_autofree gchar *name = NULL;
g_autoptr(GAppInfo) app = NULL;
@@ -227,7 +226,6 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
COL_DESCRIPTION, &description,
-1);
id = g_app_info_get_id (app);
- escaped_description = g_markup_escape_text (description, -1);
g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&builder, "{sv}",
@@ -237,7 +235,7 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
g_variant_builder_add (&builder, "{sv}",
"icon", g_icon_serialize (icon));
g_variant_builder_add (&builder, "{sv}",
- "description", g_variant_new_string (escaped_description));
+ "description", g_variant_new_string (description));
g_variant_builder_close (&builder);
}