diff options
author | Shaun McCance <shaunm@gnome.org> | 2009-08-27 13:17:12 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2009-08-27 13:20:05 -0500 |
commit | 70fed67f08568b5f0da24023276d7d48f7f62465 (patch) | |
tree | 5a10ec23770c91039b07d197194da91a91636fb2 | |
parent | ecbb1b27cf0ced3f5e8c52dccce70a889f5b19f0 (diff) | |
download | yelp-70fed67f08568b5f0da24023276d7d48f7f62465.tar.gz |
Make sure link title roles are preserved in cache
-rw-r--r-- | src/yelp-mallard.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/yelp-mallard.c b/src/yelp-mallard.c index 080ff37c..6b355a47 100644 --- a/src/yelp-mallard.c +++ b/src/yelp-mallard.c @@ -498,12 +498,8 @@ mallard_page_data_info (MallardPageData *page_data, else if (xmlStrEqual (child->name, BAD_CAST "title")) { xmlNodePtr node, title_node; xmlChar *type, *role; - title_node = xmlNewChild (cache_node, - page_data->mallard->priv->cache_ns, - BAD_CAST "title", NULL); - for (node = child->children; node; node = node->next) { - xmlAddChild (title_node, xmlCopyNode (node, 1)); - } + title_node = xmlCopyNode (child, 1); + xmlAddChild (cache_node, title_node); type = xmlGetProp (child, BAD_CAST "type"); role = xmlGetProp (child, BAD_CAST "role"); @@ -512,15 +508,6 @@ mallard_page_data_info (MallardPageData *page_data, page_data->link_title = TRUE; if (xmlStrEqual (type, BAD_CAST "sort")) page_data->sort_title = TRUE; - - if (type) { - xmlSetProp (title_node, BAD_CAST "type", BAD_CAST type); - xmlFree (type); - } - if (role) { - xmlSetProp (title_node, BAD_CAST "role", BAD_CAST type); - xmlFree (role); - } } else if (xmlStrEqual (child->name, BAD_CAST "desc") || xmlStrEqual (child->name, BAD_CAST "link")) { |