[gnome-builder] file-search: escape markup before highlighting
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] file-search: escape markup before highlighting
- Date: Thu, 8 Jun 2017 20:37:52 +0000 (UTC)
commit f563380ded1dd036c37893af28dba9afac9ae3db
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 8 13:27:35 2017 -0700
file-search: escape markup before highlighting
plugins/file-search/gb-file-search-index.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/file-search/gb-file-search-index.c b/plugins/file-search/gb-file-search-index.c
index 4b70ce2..006e21e 100644
--- a/plugins/file-search/gb-file-search-index.c
+++ b/plugins/file-search/gb-file-search-index.c
@@ -333,13 +333,15 @@ gb_file_search_index_populate (GbFileSearchIndex *self,
if (ide_search_reducer_accepts (&reducer, match->score))
{
g_autoptr(GbFileSearchResult) result = NULL;
+ g_autofree gchar *escaped = NULL;
g_autofree gchar *markup = NULL;
g_autofree gchar *free_me = NULL;
const gchar *filename = match->key;
const gchar *icon_name = "text-x-generic-symbolic";
const gchar *content_type;
- markup = dzl_fuzzy_highlight (match->key, delimited->str, FALSE);
+ escaped = g_markup_escape_text (match->key, -1);
+ markup = dzl_fuzzy_highlight (escaped, delimited->str, FALSE);
/*
* Try to get a more appropriate icon, but by filename only.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]