summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Scorgie <dscorgie@src.gnome.org>2007-11-07 19:37:22 +0000
committerDon Scorgie <dscorgie@src.gnome.org>2007-11-07 19:37:22 +0000
commit5e5041f279041963b62b8a47554bdd1000a8fcbf (patch)
treecdf4d28604a7c6474a8e4c47b325a453de4d7f75
parentce5ed53931636a4e2a1803280972a80dd509af42 (diff)
downloadyelp-5e5041f279041963b62b8a47554bdd1000a8fcbf.tar.gz
x-yelp-toc uri scheme frags now strip leading '#' and '?'s (bug #482290)
* src/yelp-utils.c: x-yelp-toc uri scheme frags now strip leading '#' and '?'s (bug #482290) svn path=/trunk/; revision=2988
-rw-r--r--ChangeLog4
-rw-r--r--src/yelp-utils.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7627bc78..c6c5580b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2007-11-07 Don Scorgie <dscorgie@svn.gnome.org>
+ * src/yelp-utils.c:
+ x-yelp-toc uri scheme frags now strip leading '#'
+ and '?'s (bug #482290)
+
* src/yelp-window.c:
Fix debug build (bug #492882)
diff --git a/src/yelp-utils.c b/src/yelp-utils.c
index 46a8bf8a..1a9da13f 100644
--- a/src/yelp-utils.c
+++ b/src/yelp-utils.c
@@ -387,7 +387,10 @@ yelp_uri_resolve (gchar *uri, gchar **result, gchar **section)
} else if (!strncmp (uri, "x-yelp-toc:", 11)) {
ret = YELP_RRN_TYPE_TOC;
if (strlen (uri) > 11) {
- *section = g_strdup (&uri[11]);
+ gint frag = 11;
+ while (uri[frag] == '#' || uri[frag] == '?')
+ frag++;
+ *section = g_strdup (&uri[frag]);
} else {
*section = g_strdup("index");
}