aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-02-25 20:38:41 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-02-25 20:38:41 +0100
commit8818cda9ca4e4c19c4c5fcee68460d5ba0cd5ba2 (patch)
treecb448d55507c8eb959a01195acdcc0d468fe4792
parent8cc3e9bd45da130dd9dd2fca0fefcb1a86a7c923 (diff)
extend http-equiv parsing to handle redirects without url=
On some site (m.bahn.de) the meta element looked like this: <meta http-equiv="Refresh" content="0;http://www.bahn.de/m/;fitScript=0/"> To handle the missing 'url=' in the content attribute we extend the parsing to skip beyond the ';' in case there is no 'url=' reported-by: Andreas Kemnade
-rw-r--r--src/html.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/html.cc b/src/html.cc
index fbc9ade5..53eadafe 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3147,8 +3147,11 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
} else {
sprintf(delay_str, ".");
}
- /* Skip to anything after "URL=" */
- while (*content && *(content++) != '=') ;
+ /* Skip to anything after "URL=" or ";" if "URL=" is not found */
+ if ((p = dStriAsciiStr(content, "url=")))
+ content = p + strlen("url=");
+ else if ((p = strstr(content, ";")))
+ content = p + strlen(";");
/* Handle the case of a quoted URL */
if (*content == '"' || *content == '\'') {
if ((p = strchr(content + 1, *content)))