aboutsummaryrefslogtreecommitdiffstats
path: root/src/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.c')
-rw-r--r--src/session.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/session.c b/src/session.c
index acace9d63..b5bf34d66 100644
--- a/src/session.c
+++ b/src/session.c
@@ -467,6 +467,7 @@ save_tab (EphyWindow *window,
const char *title;
xmlNodePtr embed_node;
EphyEmbed *embed;
+ xmlChar *encoded_link, *encoded_title;
chrome = ephy_window_get_chrome (window);
@@ -479,12 +480,16 @@ save_tab (EphyWindow *window,
/* store title in the node */
title = ephy_tab_get_title (tab);
- xmlSetProp (embed_node, "title", title);
+ encoded_title = xmlEncodeEntitiesReentrant (doc, title);
+ xmlSetProp (embed_node, "title", encoded_title);
+ xmlFree (encoded_title);
/* otherwise, use the actual location. */
embed = ephy_tab_get_embed (tab);
ephy_embed_get_location (embed, TRUE, &location);
- xmlSetProp (embed_node, "url", location);
+ encoded_link = xmlEncodeEntitiesReentrant (doc, location);
+ xmlSetProp (embed_node, "url", encoded_link);
+ xmlFree (encoded_link);
g_free (location);
/* insert node into the tree */