Recurse into noscript elements when looking for meta refresh. This would work perfectly, were it not for libxml's html parser terminating head and starting body on sight of a noscript tag. Joy.

svn path=/trunk/netsurf/; revision=3791
This commit is contained in:
John Mark Bell 2008-01-28 02:43:06 +00:00
parent 75fe183d01
commit 8fdd1f298e
1 changed files with 13 additions and 1 deletions

View File

@ -593,8 +593,20 @@ bool html_meta_refresh(struct content *c, xmlNode *head)
if (n->type != XML_ELEMENT_NODE)
continue;
if (strcmp((const char *)n->name, "meta"))
/* Recurse into noscript elements */
if (strcmp((const char *)n->name, "noscript") == 0) {
if (!html_meta_refresh(c, n)) {
/* Some error occurred */
return false;
} else if (c->refresh) {
/* Meta refresh found - stop */
return true;
}
}
if (strcmp((const char *)n->name, "meta")) {
continue;
}
equiv = xmlGetProp(n, (const xmlChar *)"http-equiv");
if (!equiv)