diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-08-09 16:11:58 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-08-09 16:11:58 +0000 |
commit | c9bd6fa9fce386526ea1327adea56128648f3355 (patch) | |
tree | 419a7d4fcfd1a7ae7229763f0b9ed2125be0a02c /render/html.c | |
parent | 91e6c7c65bb496f88f6af622f558b35c436f9cd2 (diff) | |
download | netsurf-c9bd6fa9fce386526ea1327adea56128648f3355.tar.gz netsurf-c9bd6fa9fce386526ea1327adea56128648f3355.tar.bz2 |
[project @ 2004-08-09 16:11:58 by jmb]
Rework the interface of the URL handing module to allow for multiple error types.
Modify save_complete URL rewriting appropriately.
svn path=/import/netsurf/; revision=1206
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/render/html.c b/render/html.c index 7bda3b02a..b19e99c30 100644 --- a/render/html.c +++ b/render/html.c @@ -304,8 +304,10 @@ void html_head(struct content *c, xmlNode *head) } else if (strcmp(node->name, "base") == 0) { char *href = (char *) xmlGetProp(node, (const xmlChar *) "href"); if (href) { - char *url = url_normalize(href); - if (url) { + char *url; + url_func_result res; + res = url_normalize(href, &url); + if (res == URL_FUNC_OK) { free(c->data.html.base_url); c->data.html.base_url = url; } @@ -330,6 +332,7 @@ void html_find_stylesheets(struct content *c, xmlNode *head) unsigned int i = STYLESHEET_START; unsigned int last_active = 0; union content_msg_data msg_data; + url_func_result res; /* stylesheet 0 is the base style sheet, * stylesheet 1 is the adblocking stylesheet, @@ -414,9 +417,9 @@ void html_find_stylesheets(struct content *c, xmlNode *head) /* TODO: only the first preferred stylesheets (ie. those with a * title attribute) should be loaded (see HTML4 14.3) */ - url = url_join(href, c->data.html.base_url); + res = url_join(href, c->data.html.base_url, &url); xmlFree(href); - if (!url) + if (res != URL_FUNC_OK) continue; LOG(("linked stylesheet %i '%s'", i, url)); |