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:
parent
75fe183d01
commit
8fdd1f298e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue