Escape document index titles

Fixes #692
This commit is contained in:
Moritz Lipp 2017-10-30 15:57:19 +01:00
parent f6e0eb9703
commit 28337773ec

View File

@ -84,7 +84,9 @@ document_index_build(GtkTreeModel* model, GtkTreeIter* parent,
GtkTreeIter tree_iter;
gtk_tree_store_append(GTK_TREE_STORE(model), &tree_iter, parent);
gtk_tree_store_set(GTK_TREE_STORE(model), &tree_iter, 0, index_element->title, 1, description, 2, index_element, -1);
gchar* markup = g_markup_escape_text(index_element->title, -1);
gtk_tree_store_set(GTK_TREE_STORE(model), &tree_iter, 0, markup, 1, description, 2, index_element, -1);
g_free(markup);
g_object_weak_ref(G_OBJECT(model), (GWeakNotify) zathura_index_element_free, index_element);
g_free(description);