summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-01-28 02:43:06 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-01-28 02:43:06 +0000
commit8fdd1f298ec76764a1040f36432dfadc366cbe72 (patch)
tree4fcd246fdab695dc46720b068b43d5a597b1f9f6 /render
parent75fe183d013b2f379b916afa209cc55542ccc0ef (diff)
downloadnetsurf-8fdd1f298ec76764a1040f36432dfadc366cbe72.tar.gz
netsurf-8fdd1f298ec76764a1040f36432dfadc366cbe72.tar.bz2
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
Diffstat (limited to 'render')
-rw-r--r--render/html.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/render/html.c b/render/html.c
index 5a9ba27ef..c54f23ea8 100644
--- a/render/html.c
+++ b/render/html.c
@@ -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)