summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2010-04-26 10:19:39 -0500
committerShaun McCance <shaunm@gnome.org>2010-04-26 10:19:39 -0500
commit40e691bee71a6e486be030af65189c8e33ee54ba (patch)
treed1ae567ca5f21873957dfd457626db230a66368f
parent54c8893083ab7a0d83defa07a6cad2546b0a613d (diff)
downloadyelp-40e691bee71a6e486be030af65189c8e33ee54ba.tar.gz
Don't break on info pages with "/" in title (Edward Sheldrake)
-rw-r--r--src/yelp-window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 401e0599..67bfc09d 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -1153,6 +1153,8 @@ yelp_window_load (YelpWindow *window, const gchar *uri)
because right now we're outputting "#page_id/section_id".
*/
faux_frag_id = g_strdup (frag_id);
+ if ( priv->current_type == YELP_RRN_TYPE_MAL )
+ {
slash = strchr (faux_frag_id, '/');
if (slash)
*slash = '\0';
@@ -1170,6 +1172,7 @@ yelp_window_load (YelpWindow *window, const gchar *uri)
g_free (slash);
frag_id = new_frag_id;
}
+ }
window_setup_window (window, type, real_uri, frag_id,
(gchar *) uri, current_base, need_hist);
priv->current_request = yelp_document_get_page (doc,
@@ -2386,7 +2389,7 @@ history_load_entry (YelpWindow *window, YelpHistoryEntry *entry)
be scrolling to the section as well.
*/
slash = strchr (entry->frag_id, '/');
- if (slash)
+ if (entry->type == YELP_RRN_TYPE_MAL && slash)
frag_id = g_strndup (entry->frag_id, slash - entry->frag_id);
else
frag_id = g_strdup (entry->frag_id);