[yelp: 10/17] yelp-uri: Never let 'search=' be a frag ID
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [yelp: 10/17] yelp-uri: Never let 'search=' be a frag ID
- Date: Sun, 13 Feb 2011 22:29:44 +0000 (UTC)
commit a8746d7e1931b1416f49846a7bbc168bb6c1d985
Author: Shaun McCance <shaunm gnome org>
Date:   Sun Feb 13 13:43:53 2011 -0500
    yelp-uri: Never let 'search=' be a frag ID
 libyelp/yelp-uri.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index 761e6d0..14b80e1 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -763,6 +763,11 @@ resolve_ghelp_uri (YelpUri *uri)
         priv->frag_id = g_strdup (hash);
     }
 
+    if (priv->frag_id && g_str_has_prefix (priv->frag_id, "search=")) {
+        g_free (priv->frag_id);
+        priv->frag_id = NULL;
+    }
+
     priv->docuri = g_strconcat ("ghelp:", document,
                                 slash ? "/" : NULL,
                                 slash, NULL);
@@ -830,6 +835,10 @@ resolve_help_uri (YelpUri *uri)
 
     if (hash)
         priv->frag_id = hash;
+    if (priv->frag_id && g_str_has_prefix (priv->frag_id, "search=")) {
+        g_free (priv->frag_id);
+        priv->frag_id = NULL;
+    }
 
     priv->docuri = g_strconcat ("help:", document, NULL);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]