mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
[project @ 2006-01-28 16:01:19 by jmb]
Fix meta-refresh implementation svn path=/import/netsurf/; revision=2049
This commit is contained in:
parent
8fc96b9862
commit
b9de635dab
@ -372,6 +372,8 @@ bool html_convert(struct content *c, int width, int height)
|
||||
/**
|
||||
* Search for meta refresh
|
||||
*
|
||||
* http://wp.netscape.com/assist/net_sites/pushpull.html
|
||||
*
|
||||
* \param c content structure
|
||||
* \param head xml node of head element
|
||||
* \return true on success, false otherwise (error reported)
|
||||
@ -411,6 +413,22 @@ bool html_meta_refresh(struct content *c, xmlNode *head)
|
||||
|
||||
msg_data.delay = (int)strtol((char *) content, &url, 10);
|
||||
|
||||
if (url == end) {
|
||||
/* Just delay specified, so refresh current page */
|
||||
xmlFree(content);
|
||||
|
||||
c->refresh = talloc_strdup(c, c->url);
|
||||
if (!c->refresh) {
|
||||
msg_data.error = messages_get("NoMemory");
|
||||
content_broadcast(c,
|
||||
CONTENT_MSG_ERROR, msg_data);
|
||||
return false;
|
||||
}
|
||||
|
||||
content_broadcast(c, CONTENT_MSG_REFRESH, msg_data);
|
||||
break;
|
||||
}
|
||||
|
||||
for ( ; url <= end - 4; url++) {
|
||||
if (!strncasecmp(url, "url=", 4))
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user