diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/ephy-toolbars-model.c | 6 | ||||
-rw-r--r-- | src/session.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c index 6384b06e5..f0667994f 100755 --- a/src/ephy-toolbars-model.c +++ b/src/ephy-toolbars-model.c @@ -321,6 +321,7 @@ static void ephy_toolbars_model_set_bookmarks (EphyToolbarsModel *model, EphyBookmarks *bookmarks) { EggToolbarsModel *egg_model = EGG_TOOLBARS_MODEL (model); + gboolean success = FALSE; model->priv->bookmarks = bookmarks; g_object_ref (model->priv->bookmarks); @@ -329,10 +330,11 @@ ephy_toolbars_model_set_bookmarks (EphyToolbarsModel *model, EphyBookmarks *book if (g_file_test (model->priv->xml_file, G_FILE_TEST_EXISTS)) { - egg_toolbars_model_load (egg_model, + success = egg_toolbars_model_load (egg_model, model->priv->xml_file); } - else + + if (success == FALSE) { const char *default_xml; 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 */ |