]> www.fi.muni.cz Git - evince.git/commitdiff
Escape link title before setting it in the model
authorMarco Pesenti Gritti <mpg@redhat.com>
Sat, 24 Sep 2005 09:27:14 +0000 (09:27 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Sat, 24 Sep 2005 09:27:14 +0000 (09:27 +0000)
2005-09-24  Marco Pesenti Gritti  <mpg@redhat.com>

        * pdf/ev-poppler.cc:

        Escape link title before setting it in the model

ChangeLog
pdf/ev-poppler.cc

index 9028b9a61a5588d1cba5d61e25b702560c51d8d0..572be0c4a37d4ab9ed02d56ac56fbde28fcbd316 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-24  Marco Pesenti Gritti  <mpg@redhat.com>
+
+       * pdf/ev-poppler.cc:
+
+       Escape link title before setting it in the model
+
 2005-09-23  Marco Pesenti Gritti  <mpg@redhat.com>
 
        * shell/ev-application.c: (removed_from_session), (save_session),
index 5633840e9297db5841cbb1d3805a34c00feef4a4..9b1fc47d2fedbaeb8f18c7f81f374c47c696374e 100644 (file)
@@ -819,16 +819,22 @@ build_tree (PdfDocument      *pdf_document,
                action = poppler_index_iter_get_action (iter);
                expand = poppler_index_iter_is_open (iter);
                if (action) {
+                       char *title_markup;
+
                        gtk_tree_store_append (GTK_TREE_STORE (model), &tree_iter, parent);
                        link = ev_link_from_action (action);
                        poppler_action_free (action);
+                       title_markup = g_markup_escape_text (ev_link_get_title (link), -1);
 
                        gtk_tree_store_set (GTK_TREE_STORE (model), &tree_iter,
-                                           EV_DOCUMENT_LINKS_COLUMN_MARKUP, ev_link_get_title (link),
+                                           EV_DOCUMENT_LINKS_COLUMN_MARKUP, title_markup,
                                            EV_DOCUMENT_LINKS_COLUMN_LINK, link,
                                            EV_DOCUMENT_LINKS_COLUMN_EXPAND, expand,
                                            -1);
+
+                       g_free (title_markup);
                        g_object_unref (link);
+
                        child = poppler_index_iter_get_child (iter);
                        if (child)
                                build_tree (pdf_document, model, &tree_iter, child);