From f13643d704f43a310d66183da8fd83f387523860 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 30 Jun 2003 22:21:33 +0000 Subject: [project @ 2003-06-30 22:21:33 by bursa] Strip fragment identifiers from URLs svn path=/import/netsurf/; revision=194 --- content/fetchcache.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/fetchcache.c b/content/fetchcache.c index 5a371960f..8f267f70f 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -18,12 +18,18 @@ static void fetchcache_callback(fetch_msg msg, void *p, char *data, unsigned long size); -struct content * fetchcache(const char *url, char *referer, +struct content * fetchcache(const char *url0, char *referer, void (*callback)(content_msg msg, struct content *c, void *p1, void *p2, const char *error), void *p1, void *p2, unsigned long width, unsigned long height) { struct content *c; + char *url = xstrdup(url0); + char *hash = strchr(url, '#'); + + /* strip fragment identifier */ + if (hash != 0) + *hash = 0; LOG(("url %s", url)); -- cgit v1.2.3